Nightmares occur primarily during REM (rapid eye movement) sleep, the stage of sleep when your brain is most active and vivid dreaming takes place. Because REM periods grow longer as the night progresses, nightmares are most common in the early morning hours, during the final third of your sleep.
Why REM Sleep Produces Nightmares
Your brain cycles through several sleep stages multiple times each night. The early cycles are dominated by deep, slow-wave sleep, while REM periods are short, sometimes only a few minutes. As the night goes on, that balance shifts. REM periods stretch longer, and by the last couple of cycles before you wake up, a single REM phase can last 30 minutes or more. This is when most dreaming happens, and it’s when nightmares are most likely to strike.
During REM sleep, brain activity looks remarkably similar to what it looks like when you’re awake. Your eyes move rapidly beneath closed lids, and the emotional centers of your brain, particularly the amygdala (which processes fear) and the hippocampus (which handles memory), are highly active. At the same time, the prefrontal areas responsible for rational thinking and emotional regulation are less engaged than they are during waking life. That combination creates the perfect conditions for intense, emotionally charged dreams that can tip into frightening territory.
One leading neurocognitive model proposes that normal dreaming actually serves a fear extinction function: your brain replays threatening scenarios in a safe context, gradually weakening the emotional charge attached to them. Nightmares may represent a failure of that process, where the prefrontal cortex can’t adequately dial down the fear signals generated by the amygdala and hippocampus. Research has found that people who experience more severe nightmares tend to show reduced activity in those prefrontal regulation areas even during waking hours.
Your Body During a Nightmare
One distinctive feature of REM sleep is muscle atonia, a temporary paralysis of your arms and legs. Nerve pathways in the brain actively shut down voluntary muscle movement during this stage, which prevents you from physically acting out your dreams. So even during an intense nightmare involving running or fighting, your body stays still.
In a condition called REM sleep behavior disorder, those nerve pathways stop working properly. People with this disorder do physically act out their dreams, sometimes violently, because the normal paralysis mechanism fails. This is different from what most people experience during nightmares, where you feel frozen in place precisely because the system is working as designed.
Unlike night terrors, which cause dramatic physical responses like screaming and thrashing, nightmares typically produce little visible disturbance. You wake up alert, oriented, and able to recall exactly what you dreamed. That vivid recall is itself a hallmark of REM sleep, when the brain’s memory systems are engaged in a way they aren’t during deeper sleep stages.
Nightmares vs. Night Terrors
These two experiences are often confused, but they happen in completely different stages of sleep and feel nothing alike. Nightmares arise from REM sleep and tend to occur in the second half of the night. Night terrors arise from deep slow-wave sleep (stages 3 and 4 of non-REM sleep) and typically happen in the first half of the night, often within the first few hours after falling asleep.
The experience is fundamentally different too. After a nightmare, you wake up fully and remember the dream in detail. After a night terror, there’s usually confusion, disorientation, and little or no memory of what happened. Night terrors also involve intense physical arousal: a racing heart, sweating, sometimes screaming or sitting bolt upright. A third category, nocturnal panic attacks, falls somewhere in between. These tend to occur during the transition from light sleep to deep sleep, also in the first few hours of the night.
How Common Nightmares Are
Nightmares are most frequent in childhood. Roughly 25% to 30% of children report having at least one nightmare in the past month. For adults, occasional nightmares are considered normal, but frequent ones are less common. In a study of about 800 adults in the UK, approximately 1 in 20 reported having nightmares every week. Full nightmare disorder, defined as repeated, extremely distressing dreams that cause significant impairment in daily life, affects 2% to 5% of adults.
What Can Trigger More Nightmares
Anything that intensifies or disrupts REM sleep can increase nightmare frequency. Stress and anxiety are the most common triggers, but certain medications play a significant role too. Some antidepressants, particularly those that suppress REM sleep during use, can cause a “REM rebound” effect when discontinued. If you stop taking them suddenly, REM sleep surges back with unusual intensity, often bringing a wave of vivid nightmares. This rebound effect has been documented across several classes of antidepressants.
Some medications increase nightmares even during regular use. Fluoxetine, for example, is one of the few antidepressants that increases both dream recall and nightmare frequency while you’re taking it. Sleep deprivation has a similar effect: when you finally catch up on sleep after a period of poor rest, your brain compensates with longer and more intense REM periods, which can fuel more vivid and disturbing dreams.
Alcohol follows the same pattern. It suppresses REM sleep in the first half of the night, then produces a rebound in the second half as it’s metabolized. This is one reason people who drink heavily often report disturbing dreams toward morning.
Treating Frequent Nightmares
For people whose nightmares are frequent enough to disrupt sleep or daily functioning, the most well-studied treatment is imagery rehearsal therapy. The technique is straightforward: while awake during the day, you write down a recurring nightmare, change the storyline to something less threatening, and then mentally rehearse the new version for 10 to 20 minutes. Over time, this retrains the brain’s response to the dream content.
A meta-analysis of imagery rehearsal studies found large improvements in nightmare frequency, sleep quality, and post-traumatic stress symptoms. Those gains held up at 6- to 12-month follow-ups, with some measures actually improving further over time. When imagery rehearsal was combined with broader cognitive behavioral therapy for insomnia, sleep quality improved even more, though nightmare frequency itself didn’t show additional benefit from the combination.
The logic behind why this works ties back to the same brain networks involved in REM sleep. By consciously rehearsing a new version of the dream, you’re essentially giving the prefrontal cortex a script to work with, strengthening its ability to regulate the fear response during sleep. It’s a way of restoring the natural fear extinction process that nightmares seem to disrupt.

