Having a good night's sleep helps wipe out bad memories and combat stress, scientists have discovered.
Researchers from the University of California, Berkeley, found that our brains process emotional experiences during the Rapid Eye Movement phase of sleep and this makes painful memories easier to deal with.
The study asked 35 volunteers to look at 150 emotional images twice, 12 hours apart, while an MRI scan measured their brain activity.
Half of the volunteers looked at the images during the morning and again in the evening, while the other half looked at the images in the evening and again in the next morning after a full night's sleep.
The results, published in the Current Biology journal, found that those who slept between the image viewings reported a significant decrease in their emotional reactions to the images.
Researchers found that sleep reduced reactivity in the amygdala part of the brain that processes emotion. Sleep also enabled the brain's 'rational' prefrontal cortex to regain control of emotional reactions.
"During REM sleep, memories are being reactivated, put in perspective and connected and integrated, but in a state where stress neurochemicals are beneficially suppressed," says study author Els van der Helm.
"The dream stage of sleep, based on its unique neurochemical composition, provides us with a form of overnight therapy, a soothing balm that removes the sharp edges from the prior day's emotional experiences," added co-author of the study, Professor Matthew Walker.
As well as erasing bad memories, dreaming could also give you some insight into your inner thoughts and fears. Sleep experts and dream analysts Ian Wallace and Delphi Ellis explain what some of our most common dreams could represent.