SymptomMental health & sleep

Nightmares: Why They Happen and How to Stop Them

Nightmares are vivid, frightening dreams that wake you up, usually in the second half of the night during REM sleep, and leave you able to recall them. Occasional nightmares are normal, especially in children aged 3 to 6. Frequent nightmares in adults are often linked to stress, anxiety, PTSD, depression, poor sleep, alcohol or medicines such as some antidepressants and beta-blockers. Imagery rehearsal therapy is the most effective treatment for recurring nightmares.

Also called: Bad dreams, disturbing dreams, nightmare disorder, dream anxiety

At a glance

What they are
Frightening dreams during REM sleep that wake you, with clear memory of the content.
How common
Most children have them. About 2 to 8% of adults have frequent nightmares.
Common causes
Stress, trauma and PTSD, anxiety, depression, sleep deprivation, alcohol and some medicines.
Not the same as
Night terrors, which happen in deep sleep early in the night with screaming and no memory.
Treatment
Imagery rehearsal therapy, treating PTSD or other causes, reviewing medicines, and sometimes prazosin.

When to get help

Call 911 or go to the ER

  • Nightmares with thoughts of suicide or self-harm: call or text 988 (US), or call 911 if in immediate danger
  • Acting out dreams violently, injuring yourself or a bed partner, together with confusion, a new severe headache or weakness

See a doctor within a day or two

  • Nightmares with hallucinations, severe agitation or confusion while withdrawing from alcohol or sedatives
  • Sudden onset of frequent nightmares after starting a new medicine, with mood changes

Book a routine appointment

  • Nightmares several times a week, or that make you afraid to go to sleep
  • Recurring nightmares about a traumatic event, with flashbacks or avoidance
  • Punching, kicking or shouting during dreams (possible REM sleep behavior disorder), especially after age 50
  • Loud snoring, gasping or choking at night with nightmares and daytime sleepiness
  • A child with nightmares and night terrors most nights, or with daytime anxiety or behavior changes

Usually safe to manage at home

  • An occasional bad dream after a stressful day, a scary film or late-night alcohol

What a nightmare is

A nightmare is a long, story-like dream that becomes so frightening, sad, disgusting or threatening that it wakes you. Common themes are being chased, attacked, falling, losing someone or failing. On waking you are quickly alert and oriented, can usually remember the dream in detail, and may have a racing heart, sweating and fear that make it hard to fall back asleep.

Nightmares happen during REM (rapid eye movement) sleep, the stage with the most vivid dreaming. REM periods get longer toward morning, so nightmares are most common in the second half of the night.

Nightmare disorder is diagnosed when nightmares are frequent and cause distress or problems with daytime functioning, such as fear of sleeping, fatigue or poor concentration.

Nightmares vs night terrors

NightmaresNight terrors
Sleep stageREM sleepDeep non-REM sleep
Time of nightSecond half, early morningFirst 1 to 3 hours
BehaviorWakes up scared, may cry or call outScreams, thrashes, sits up, eyes open, inconsolable
AwarenessFully awake, can be comfortedNot really awake, confused, does not recognize you
MemoryRemembers the dreamNo memory next morning
Most common ageChildren 3 to 6, but any ageChildren 1 to 8 (peak 3 to 7)

During a night terror, keep the child safe and wait. Do not try to wake them. Most outgrow night terrors.

Causes of nightmares

Stress and life events

Work or school pressure, relationship problems, moving, bereavement and illness often bring a run of bad dreams that settle when the stress eases.

Trauma and PTSD

Up to 70% or more of people with post-traumatic stress disorder have nightmares, often replaying the trauma. Trauma nightmares are among the hardest to shift and are a target of specific treatment.

Mental health conditions

Medicines and substances

  • Antidepressants (especially when starting, stopping or changing dose), and some sleep aids
  • Beta-blockers, particularly propranolol and metoprolol
  • Parkinson's medicines such as levodopa and dopamine agonists
  • Some smoking cessation aids such as varenicline, and nicotine patches worn overnight
  • Montelukast for asthma and allergies, which carries an FDA boxed warning about mental health effects, including nightmares
  • Alcohol: it suppresses REM sleep early in the night, then REM "rebounds" later, causing vivid dreams. Withdrawal from alcohol, sedatives or cannabis also causes intense dreams.

Sleep problems

  • Sleep deprivation and irregular schedules, including shift work and jet lag
  • Obstructive sleep apnea: breathing pauses can trigger frightening dreams of suffocation or drowning
  • Narcolepsy: vivid dreams at sleep onset with daytime sleepiness
  • REM sleep behavior disorder: people physically act out violent dreams. In adults over 50, it can be an early sign of Parkinson's disease or Lewy body dementia, so it needs medical review

Other triggers

  • fever and illness, especially in children
  • eating late at night (which raises metabolism and brain activity)
  • frightening films, books or games before bed

Nightmares in children

Nightmares are very common between ages 3 and 6, as imagination develops. They often follow a stressful change such as starting school or a new sibling. To help:

  • comfort and reassure the child, and stay until they calm down
  • keep a calm, predictable bedtime routine
  • avoid scary media before bed
  • use a night light and a comfort object
  • talk about the dream in the daytime and "change the ending" together through drawing or stories

See a pediatrician if nightmares are very frequent, follow a trauma, or come with daytime fears, withdrawal or behavior changes.

How nightmares are assessed

A doctor will ask how often nightmares happen, what they are about, when they began, and about trauma, mood, anxiety, alcohol, drugs, medicines and sleep habits. A bed partner's account helps with snoring, breathing pauses and movement during sleep. A sleep study (polysomnography) is used when sleep apnea, REM sleep behavior disorder or narcolepsy is suspected.

How to stop nightmares

Imagery rehearsal therapy

Imagery rehearsal therapy (IRT) is recommended by the American Academy of Sleep Medicine as a first-line treatment. You:

  1. write down a recurring nightmare
  2. change the story in any way you like, to make it less distressing
  3. rehearse the new version in your mind for 10 to 20 minutes every day

Over a few weeks, nightmares often become less frequent and less intense. It can be learned with a therapist, and self-help guides exist.

Other therapies

  • Cognitive behavioral therapy for insomnia (CBT-I), which improves sleep overall
  • Trauma-focused therapies for PTSD, such as prolonged exposure, cognitive processing therapy and EMDR
  • Exposure, relaxation and rescripting therapy, combining imagery rehearsal with relaxation

Medicines

  • Prazosin, a blood pressure medicine, is sometimes used for PTSD-related nightmares. Evidence is mixed, and it can cause dizziness on standing.
  • Changing or stopping a medicine that causes nightmares, with your doctor's advice. Do not stop antidepressants suddenly.
  • Treating underlying depression, anxiety or sleep apnea, often with CPAP for apnea.

Self-help that helps

  • keep regular sleep and wake times, and get enough sleep
  • limit alcohol, especially in the evening, and avoid recreational drugs
  • wind down for 30 to 60 minutes before bed with a calming activity
  • avoid frightening or violent content before sleep
  • if you wake from a nightmare, get up for a short time, breathe slowly and do something calming before returning to bed
  • exercise regularly, but not in the hour or two before bed

Frequently asked questions

What causes frequent nightmares in adults?

The most common causes are stress, anxiety, depression, past trauma or PTSD, poor or irregular sleep, alcohol and medicines such as some antidepressants, beta-blockers and Parkinson's drugs. Sleep apnea and narcolepsy can also cause them. A doctor can help identify and treat the cause.

What is the difference between nightmares and night terrors?

Nightmares are frightening dreams in REM sleep, usually later in the night. The person wakes fully and remembers them. Night terrors occur in deep sleep early in the night. The person screams or thrashes, cannot be comforted and has no memory of the episode the next morning.

Can medications cause nightmares?

Yes. Common culprits include some antidepressants, beta-blockers, Parkinson's medicines, montelukast, varenicline, and nicotine patches worn overnight. Withdrawal from alcohol, sedatives or cannabis can also cause vivid dreams. Talk to your doctor before stopping or changing any prescribed medicine.

How can I stop having nightmares?

Imagery rehearsal therapy, which involves rewriting a nightmare and practicing the new version while awake, is the most effective approach. Keeping a regular sleep schedule, limiting alcohol, managing stress and treating conditions such as PTSD, depression and sleep apnea also help.

Are nightmares a sign of a mental illness?

Not usually. Occasional nightmares are normal. Frequent, distressing nightmares can be linked to PTSD, anxiety or depression and are worth discussing with a doctor or therapist, especially if they make you afraid to sleep or affect daily life.

Sources

This guide was written from current patient and clinical guidance, including:

  • American Academy of Sleep Medicine: Position paper for the treatment of nightmare disorder in adults
  • MedlinePlus: Nightmares
  • American Academy of Pediatrics (HealthyChildren.org): Nightmares and night terrors
  • NHS: Nightmares and night terrors
  • US Department of Veterans Affairs, National Center for PTSD: Nightmares and PTSD