You are being chased but cannot run fast enough.
You are falling. You are trapped. Someone you love is in danger. Or something completely impossible is happening, yet while you are asleep it feels terrifyingly real.
Then you suddenly wake up, heart racing, and realize none of it actually happened.
Nightmares are vivid, disturbing dreams that are powerful enough to wake us from sleep. They are extremely common, particularly in childhood, and almost everyone experiences them occasionally.
But exactly why the sleeping brain sometimes transforms ordinary worries, memories, and emotions into terrifying stories remains surprisingly mysterious.
Nightmares Are More Than Just Bad Dreams
In everyday conversation, we call almost any unpleasant dream a nightmare.
Sleep medicine makes a slightly more specific distinction.
A bad dream can be disturbing without waking you.
A nightmare generally becomes intense enough that you actually wake up—and once awake, you can often remember the dream quite clearly.
You may immediately know where you are, yet the fear can linger long after the dream has ended.
Most Nightmares Happen During REM Sleep
Nightmares occur particularly often during rapid eye movement sleep, better known as REM sleep.
During REM, brain activity becomes surprisingly active, the eyes move rapidly beneath the eyelids, and vivid dreaming is especially common.
At the same time, the brain normally suppresses most voluntary muscle movement.
This temporary muscle paralysis helps prevent you from physically acting out what is happening in your dreams.
REM periods become longer as the night progresses, which is why nightmares frequently occur during the second half of the night or toward morning.
Why Does the Brain Dream at All?
This is the first problem researchers encounter when trying to explain nightmares.
Scientists still do not completely understand why we dream in the first place.
Dreaming may be involved in several processes rather than having one single purpose.
Researchers have proposed roles involving:
- memory processing
- learning
- emotional regulation
- integrating recent experiences
- simulating situations
But there is no universally accepted explanation saying, “This is exactly what dreams are for.”
Nightmares are therefore a mystery nested inside another mystery.
Stress Is One of the Clearest Triggers
Although the ultimate purpose of nightmares remains uncertain, we know quite a bit about what can make them more likely.
Stress is one of the strongest influences.
An argument, an upcoming exam, financial worries, moving house, problems at work, illness, or another emotionally difficult event can all find their way into dreams.
The nightmare does not necessarily replay the event literally.
You might be anxious about a deadline and dream instead that you are being chased through an unfamiliar building.
The details are different, but the underlying feeling—pressure, helplessness, fear—may be very familiar.
Your Brain May Be Processing Emotion While You Sleep
One major theory proposes that dreaming helps the brain process emotional experiences.
During sleep, recent events can interact with older memories and emotional networks.
A nightmare may therefore represent the sleeping brain attempting to work with threatening or stressful material.
But it is important not to turn that idea into a simplistic rule.
A nightmare about falling does not necessarily mean you “feel out of control,” and dreaming about losing your teeth does not have one universal psychological meaning.
Dream imagery is highly individual.
Why Do Nightmares Feel So Real?
During a vivid nightmare, the brain can generate an entire convincing world without receiving the normal amount of information from the outside environment.
Emotion-related brain systems can be highly active during REM sleep.
Meanwhile, the parts of the brain responsible for critical evaluation and logical reasoning do not necessarily operate exactly as they do while you are fully awake.
That helps explain something bizarre about dreams:
You may accept completely impossible situations without questioning them.
A monster is chasing you through your childhood school while the building floats in the sky—and instead of thinking, “This makes no sense,” your sleeping brain reacts as though survival depends on escaping.
Trauma Can Produce Particularly Intense Nightmares
Nightmares can be strongly associated with traumatic experiences.
People with post-traumatic stress disorder, or PTSD, may repeatedly dream about the traumatic event itself or experience nightmares containing similar feelings of danger, helplessness, or fear.
In these cases, nightmares can become part of a larger cycle.
The person fears going to sleep because of the nightmares, sleeps less, becomes more exhausted and stressed, and may then experience further sleep disruption.
That is very different from occasionally waking from a frightening dream after a stressful day.
Being Sleep-Deprived Can Actually Make Dreams More Intense
It sounds logical that sleeping less would mean dreaming less.
But after a period of insufficient sleep, the brain can sometimes spend more time in REM sleep once the opportunity for normal sleep returns.
This is known as REM rebound.
That rebound can be associated with especially vivid dreaming and, for some people, more nightmares.
So trying to avoid nightmares by staying awake can potentially make the situation worse.
It is another reason consistent sleep matters, as discussed in Why Sleep Is So Important.
Some Medications and Substances Can Affect Nightmares
Anything that significantly alters brain chemistry or sleep architecture can potentially change dreaming.
Certain prescription medications have been associated with vivid dreams or nightmares in some people.
Alcohol and recreational drugs can also disrupt normal sleep patterns.
Stopping some substances or medications that previously suppressed REM sleep may produce a temporary REM rebound accompanied by unusually vivid dreams.
That does not mean a medication should be stopped because of a nightmare. Sudden medication changes can create their own problems and should be discussed with a healthcare professional.
Why Do Children Have So Many Nightmares?
Nightmares are particularly common during childhood.
A child’s imagination is developing rapidly while their understanding of danger and reality is still changing.
Everyday experiences that seem minor to an adult—a new school, an argument, a frightening movie, being separated from a parent—can carry enormous emotional weight.
Children also have fewer years of experience telling them that many frightening possibilities are unlikely.
Nightmares generally become less frequent as children move through adolescence, although adults certainly continue to have them.
Nightmares Are Not the Same as Night Terrors
The names sound similar, but the experiences are quite different.
Nightmares usually occur during REM sleep. The person wakes up and can often describe the frightening dream.
Night terrors usually arise from non-REM sleep, often earlier in the night.
Someone experiencing a night terror may scream, sit upright, appear terrified, or move around while remaining largely asleep.
They can be difficult to awaken and often remember little or nothing the next morning.
A child screaming during a night terror therefore may look fully awake while actually being in a very different sleep state.
Why Do We Keep Having the Same Nightmare?
Recurring nightmares can happen when the same emotional concern remains unresolved or repeatedly activated.
The dream does not always repeat perfectly.
Instead, a person may repeatedly experience the same theme:
- being chased
- being trapped
- failing an important task
- being unable to speak or move
- losing someone
- returning to a frightening experience
This does not mean the dream contains a secret coded message.
It may simply mean the brain repeatedly encounters similar emotional material during sleep.
Can Scary Movies Cause Nightmares?
They can contribute, particularly if the material is emotionally powerful or viewed shortly before sleep.
Anything that strongly occupies your attention can influence the material available to the dreaming brain.
But the nightmare may not reproduce the movie directly.
The brain routinely combines fragments of memories, places, people, worries, and imagination into completely new scenarios.
This is why the villain from a movie might somehow appear in your grandmother’s house while your childhood teacher is trying to save you.
Dream logic is not particularly concerned with continuity.
Does Eating Before Bed Cause Nightmares?
This is often claimed, but the evidence is not strong enough to say that particular foods reliably cause nightmares.
A very large or uncomfortable meal close to bedtime can interfere with sleep, and disturbed sleep can influence dreaming.
Some people also report associations between particular foods and vivid dreams.
But there is no universal “nightmare food” that has been scientifically shown to produce frightening dreams in everyone.
Can You Change a Recurring Nightmare?
Interestingly, yes—in some cases.
One established approach for recurrent nightmares is called imagery rehearsal therapy.
The person deliberately rewrites the nightmare while awake, creating a different and less frightening ending.
They then repeatedly imagine the revised version.
The idea is not to interpret the hidden meaning of the dream but to change the mental script that keeps repeating.
This approach can reduce nightmare frequency for some people, particularly when recurring nightmares are causing significant distress.
When Do Nightmares Become a Sleep Disorder?
An occasional nightmare is normal.
It becomes a different issue when nightmares occur repeatedly and significantly disrupt sleep or daytime life.
Nightmare disorder involves recurrent nightmares associated with meaningful distress, disrupted sleep, or problems functioning during the day.
Someone might become afraid to sleep, feel exhausted because of repeated awakenings, or have difficulty concentrating because their sleep is constantly interrupted.
Frequent nightmares that are worsening or seriously interfering with sleep are therefore worth discussing with a healthcare professional.
Final Thoughts
We get nightmares because the sleeping brain continues processing memories, emotions, fears, and experiences even after conscious awareness has largely switched off.
Stress, trauma, sleep deprivation, certain medications, substances, and disrupted sleep can all make frightening dreams more likely.
But science still cannot point to one definitive reason why the brain sometimes turns that nighttime processing into monsters, disasters, chases, and other terrifying stories.
Perhaps the strangest part is how convincing the illusion becomes.
You can be lying safely in your own bed while your brain simultaneously creates a threatening world, puts you inside it, and convinces you that it is completely real.
Then you wake up.
Within seconds, an entire frightening reality simply disappears.
Key Takeaways
- Nightmares are disturbing dreams intense enough to wake the sleeper.
- They occur particularly often during REM sleep and are more common later in the night.
- Scientists still do not know exactly why humans dream or why some dreams become nightmares.
- Stress, anxiety, trauma, sleep deprivation, medications, substances, and disrupted sleep can increase nightmares.
- Nightmares may be related to the brain’s processing of emotions and memories, but individual dream symbols do not have universal meanings.
- Children experience nightmares particularly often, and frequency generally decreases with age.
- Nightmares and night terrors are different sleep phenomena.
- Sleep deprivation can produce REM rebound and more vivid dreaming.
- Recurring nightmares can sometimes be treated by deliberately rehearsing a rewritten version of the dream.
- Frequent nightmares that disrupt sleep or daytime functioning may qualify as nightmare disorder.







