Dreaming is a common feature of sleep, but neuroscience has not established one agreed biological purpose for dreams. Vivid dream reports are especially common after awakening from REM sleep, although dreaming can also occur during non-REM sleep.

Brain activity changes across sleep stages, including in networks involved in perception, emotion and memory. These observations allow researchers to investigate how dreams relate to sleep physiology, but they do not demonstrate that dreams are a nightly “clean-up crew” or that they reliably remove emotional charge from memories.
Several hypotheses link dreaming or REM sleep to memory processing, emotional regulation, threat simulation or spontaneous narrative construction. Evidence for these ideas varies, and functions of sleep should not automatically be treated as functions of dreams themselves.
Dream content is also not a diagnostic test. Disturbing or repetitive dreams can occur for many reasons and should not be interpreted as proof of a hidden psychological condition.
The strongest conclusion at present is modest: dreaming is a measurable subjective experience associated with active brain processes during sleep, while its precise functions remain an open scientific question.

