Even when our dreams are scary or distressing, new research suggests they could work like "overnight therapy", recalibrating our brains so they cope better with fear the next day.

By mapping human brain activity during sleep, the findings reinforce the idea that rehearsing bad events as we dream prepares us for the real thing. Researchers found those people who reported more bad dreams also had stronger fear inhibition during wakefulness.

"For the first time, we've identified the neural correlates of fear when we dream and have observed that similar regions are activated when experiencing fear in both sleep and wakeful states," says neuroscientist Lampros Perogamvros from the University of Geneva.

Human sleep is still very much a mystery, but anyone who's woken up on the wrong side of the bed knows from personal experience that mood and sleep are closely intertwined. Exactly how is hard for scientists to say, although the idea that shut-eye can regulate our emotions is nothing new. 

Similar to when we're awake, we humans also experience emotions in our dreams, and this could impact how we feel when we wake up.

Today, it's tentatively thought that rapid eye movement somehow stabilises our negative emotions and memories. But whether that emotion can seep into our dreams is another matter.

Already, preliminary evidence suggests emotional centers in our brain, like the amygdala, are active during sleep. And when these areas are impaired, they've been shown to lessen the emotional intensity of our dreams.

Still, these could simply be correlations, and all we have so far are theories about the relationship. Under the so-called 'threat simulation theory', our brains are said to deal with fear in life by 'rehearsing' threatening events in our dreams.

Meanwhile, other models suggest a night of shut-eye somehow resolves emotional conflict, lessening negative moods the next day.

Both theories agree, on principle, that experiencing fear in our dreams leads to better responses in wakefulness; they just disagree on the 'how' part.

Now, these new results throw even more weight behind the simulation theory.

"Dreams may be considered as a real training for our future reactions and may potentially prepare us to face real life dangers," suggests Perogamvros. 

Using high-density electroencephalography (EEG) on 18 participants, researchers tracked brain activity during sleep. Each time the participants were woken up, which happened several times throughout the night, they were asked about their dreams and if they felt scared.

Analysing the results, the researchers noticed two brain regions implicated in fear: the insula and the cingulate cortex. 

Like the amdygdala, which is involved in fear conditioning, the insula is also triggered by distress and is involved with evaluating emotions during wakefulness. Meanwhile, the cingulate cortex is a part of our brain that gets our bodies ready for the event of a threat.

To find out more about these regions and their roles, neuroscientists gave a week-long dream diary to 89 participants, who were asked each morning upon waking to note how their dreams made them feel.

At the end of the week, they were placed in a magnetic resonance imaging ( MRI) machine and shown emotionally-negative images along with neutral images to see whether the emotions they experienced in their dreams changed their response to fear in real life.

"We found that the longer a [sic] someone had felt fear in their dreams, the less the insula, cingulate and amygdala were activated when the same person looked at the negative pictures," says neuroscientist Virginie Sterpenich from the University of Geneva.

"In addition, the activity in the medial prefrontal cortex, which is known to inhibit the amygdala in the event of fear, increased in proportion to the number of frightening dreams!" 

The results support theoretical claims that overnight rehearsal can recalibrate the brain through extinction learning or other tactics.

Still, the authors say that probably doesn't hold for nightmares. Unlike bad dreams, where fear levels are moderate, nightmares can cause excess distress, which could actually disrupt sleep and have a negative impact on our emotions when we wake.

"We believe that if a certain threshold of fear is exceeded in a dream, it loses its beneficial role as an emotional regulator," concludes Perogamvros.

The authors are now interested in looking at nightmares and positive emotions in our dreams to see how they affect us when we wake.

The study has been published in Human Brain Mapping.