Do you remember your dreams from last night? In how much detail? Were they related to anything you experienced during the prior day?

Some people have gone so far as to say that most people don’t dream in color. This is mostly antiscience nonsense — Of course, to answer this conjecture requires interrogating sleep subjects immediately upon waking. This causes the memories to be reconstructive — and whether they ‘remember’ dreaming in color is biased by their perceptions of how they think they should have dreamed (dreamt is also acceptable, though a bit archaic). Incidentally, when dreamers were awakened and told to quickly point to color charts to select which colors most closely match those in their dreams, they often choose pastels.

But why do we dream?

New research suggests that dreaming is a physiological and biochemical way to de-clutter our brains over night, as well as allow for creative problem-solving from generalizations we make from daily experiences. However, instead of one type of sleep being ‘better’ than another, the research team combined a couple of current working hypotheses and now suggest that REM and non-REM work together synergistically to accomplish this organization and solution-finding.

As explained in an article published in the Atlantic:

Almost a century later after Loewi’s fateful snoozes, many experiments have shown that sleep promotes creative problem-solving. Now, Penny Lewis from Cardiff University and two of her colleagues have collated and combined those discoveries into a new theory that explains why sleep and creativity are linked. Specifically, their idea explains how the two main phases of sleep—REM and non-REM—work together to help us find unrecognized links between what we already know, and discover out-of-the-box solutions to vexing problems.

In 1977, psychiatrists Hobson & McCarley proposed that we don’t actually even dream in a coherent manner that matches our perception; but rather when we’re sleeping, our brains’ patterns of neuronal firing are interpreted immediately upon waking as having had visual, kinesthetic, and auditory content. This neurobiological model proposed that dreaming is the result of random impulses originating from the brain stem. These impulses would then progress as a global occurrence across the brain. And that we hear, feel, and see in our dreams? Our brain’s way of signal processing all of the electrical noise that cascades through all of these brain regions via our neurons while we sleep. This is referred to as the Activation-Synthesis Model of dreaming.

As Hobson put it non-poetically: “The brain is so inexorably bent upon the quest for meaning that it attributes and even creates meaning when there is little or none in the data it is asked to process.” That sounds about right. In fact, when people are shown random patterns of information, they more often than not “find” patterns. Same with the sleeping brain.

Here’s how sleep works

As soon as we drift off to sleep, we enter a period of non-REM (NREM) sleep. There are 4 stages to NREM, and humans tend to spend most of their NREM time in Stage II. Staccato punctuations of ‘sleep spindles’ which represent neuronal discharge spikes occur during Stage II sleep. The last 2 stages, III and IV, are called ‘slow-wave sleep.’ These tend to be periods of the deepest sleep.

Then after a period of time, our sleep architecture changes again to what is called rapid eye movement (REM) sleep, which is a much more cognitively-active and less deep type of sleep. Interestingly, it has been noted that most of the saccadic eye movements during REM sleep are horizontal (left-right scanning) as opposed to vertical, but there is a bit of research indicating that eye patterns may be tracking dream content (i.e., if the dreamer is imagining an airplane traveling across their sightline from left to right, it’s possible that they are physically tracking in this way with their eyes as well). A counterpoint to this hypothesis has also been investigated.

Taken as a whole, when a sleeping person is connected to an electroencephalogram (EEG), an interesting pattern emerges:

During REM sleep, the neurotransmitter acetylcholine is flooded through the brain. This neurotransmitter is essential during waking hours for attention and arousal, so its presence in such high levels during REM sleep is very counterintuitive and also why REM is sometimes referred to as “paradoxical sleep.” In REM, our brains’ electrical activity is similar to that when we’re fully awake. All of the cognitive processing that’s occurring isn’t from stimuli (as when we’re awake), but from neurochemical fluctuations and electrical activity across neurons.

Many brain regions are involved, including the hippocampus (for memory storage and retrieval among other things) and the amygdala, which are thought to assist in combining experiential content (learned and experienced during waking hours, then revisited during sleep) and emotional context (by having the amygdala participate in interpreting all of the brain activity), respectively. The sensory cortex is also highly active during sleep, including visual, auditory, and kinesthetic (to a lesser degree) areas. By synthesizing the inputs from the various brain regions, we have content-rich dreaming experiences. Interestingly, and perhaps related to the problem-solving or -avoiding nature of dreams, negative emotional content is much more common in dreams than positive emotions are.

We dream in non-REM and REM phases of sleep, though recent evidence points to the fact that increased activity in the posterior cortex of the brain is associated with increased incidence of dreaming.

So there you have it. The brain is an incorrigible processor, whether we like it or not. The dreams that you have may help you revisit moments from the past to ascribe meaning, context, and problem-solving. While there isn’t necessarily any magic to the ideations that occur in dreaming, it’s important that I note that because of various pattern-differences between the functioning of the awake brain and the sleeping brain, novel ideas and thoughts that may not even be accessible to you when you’re awake may be possible when sleeping. Your typical wakeful structuring of thoughts conducted by the executive functions of the brain, including linear thinking, don’t apply the same way during sleep (because areas of the prefrontal cortex become less active). It’s likely that many of these dreaming abstractions would be irrational or unhelpful in reality, but sometimes lateral breakthrough thinking can occur while dreaming to help us in our waking lives.

Ben Locwin is a behavioral neuroscientist and astrophysicist with a masters in business, and a researcher on the genetics of human disease. BIO. Follow him on Twitter @BenLocwin.