Nightmares are vivid, disturbing dreams that wake you from sleep, often leaving you feeling scared, anxious, or upset. They are most common in children, but adults experience them too, especially during times of stress, illness, or major life changes. The good news is that most nightmares are not a sign of a serious medical problem, and for most people, they can be reduced or stopped by addressing sleep habits and stress levels. This guide explains what causes nightmares, how to prevent them, and when to seek professional help.
What Causes Nightmares in Adults?
Nightmares occur during REM (rapid eye movement) sleep, the stage where most dreaming happens. The brain is highly active during REM sleep, and nightmares are essentially dreams that trigger feelings of fear or distress. While the exact mechanism is complex, researchers know that certain factors make nightmares more likely.
Stress and anxiety are the most common triggers. A stressful day, an upcoming presentation, or a major life event like a move or a divorce can cause the brain to process those emotions during sleep. Trauma is a powerful trigger as well. People with post-traumatic stress disorder (PTSD) often have recurrent nightmares that replay the traumatic event.
Other triggers include:
- Irregular sleep schedules — shifting sleep times disrupts REM cycles
- Sleep deprivation — being overtired can lead to REM rebound, a sudden increase in REM sleep
- Certain medications — including some antidepressants, blood pressure drugs, and nicotine patches
- Alcohol and caffeine — especially when consumed close to bedtime
- Fever or illness — elevated body temperature can trigger vivid dreams
Sometimes no clear cause exists. Occasional nightmares are normal and not a cause for concern.
How To Not Have Nightmares: Practical Steps That Work
Preventing nightmares starts with improving the quality and consistency of your sleep. The brain is more likely to produce calm, neutral dreams when it is well-rested and on a regular schedule. Sleep experts consistently recommend aiming for 7 to 9 hours of sleep per night for adults, though individual needs vary.
Establish a consistent sleep-wake schedule. Go to bed and wake up at the same time every day, including weekends. This helps regulate your circadian rhythm and reduces the likelihood of REM sleep disruption. Irregular schedules confuse the brain and can increase dream intensity.
Create a relaxing bedtime routine. Spend the 30 to 60 minutes before bed doing calm activities — reading a paper book, gentle stretching, listening to quiet music, or taking a warm bath. Avoid screens during this time because the blue light from phones and computers can suppress melatonin, a hormone that regulates sleep.
Reduce stress before bed. Journaling for a few minutes can help. Write down worries or tasks for tomorrow so your brain does not have to process them during sleep. Some people find that practicing deep breathing or progressive muscle relaxation for five minutes before bed reduces nighttime anxiety.
Keep your bedroom cool, dark, and quiet. The ideal sleep environment is typically between 60 and 67 degrees Fahrenheit. A comfortable mattress and pillows also matter. If noise is an issue, consider a white noise machine.
Does Diet Affect Nightmares?
What you eat and drink in the hours before bed can influence dream content and intensity. The evidence here is mixed, but some patterns are well established. Heavy meals close to bedtime increase metabolism and body temperature, which can lead to more vivid dreams. Eating a large, spicy, or sugary meal within two hours of sleep is a common trigger for disrupted sleep and strange dreams.
Alcohol is a well-documented nightmare trigger. While alcohol initially makes you drowsy, it disrupts the sleep cycle as your body metabolizes it. Later in the night, you may experience REM rebound — a sudden surge of intense dreaming — which often produces vivid, frightening dreams. Limiting or avoiding alcohol within three hours of bedtime can reduce this effect.
Caffeine is another culprit. It blocks adenosine, a chemical that promotes sleep, and its effects can last for hours. Caffeine consumed in the afternoon can still interfere with sleep quality at night. Most sleep specialists recommend avoiding caffeine after 2 p.m.
Some research suggests that certain foods may influence dream vividness, but no food has been proven to cause or prevent nightmares. Vitamin B6 supplements have been studied for their effect on dream recall, but the evidence is not strong enough to support a recommendation. The safest approach is to eat a balanced evening meal at least two to three hours before bed and avoid stimulants.
What Is Imagery Rehearsal Therapy?
Imagery Rehearsal Therapy (IRT) is one of the most effective treatments for recurrent nightmares, especially those linked to trauma. It is a cognitive behavioral technique that has been studied in clinical trials and is recommended by many sleep specialists. The goal is to change the content of the nightmare while awake.
The process is straightforward. During the day, you write down the nightmare. Then you rewrite it with a new, neutral or positive ending. You practice rehearsing this new version mentally for a few minutes each day. Over time, the brain begins to associate the dream with the new, less threatening version, and the nightmare frequency often decreases.
IRT does not require a therapist for everyone. Some people can practice it on their own using published worksheets. However, if nightmares are linked to trauma, working with a licensed mental health professional is strongly recommended. A therapist can guide the process and address underlying issues safely.
Research has shown IRT to be effective for reducing nightmare frequency in adults with PTSD and in people with nightmares without a trauma history. Some studies report significant reductions in nightmare frequency within weeks to months of practice. The evidence is strong enough that IRT is considered a first-line treatment for chronic nightmares by many clinical guidelines.
When Should You See a Doctor About Nightmares?
Occasional nightmares are normal. But there are situations where professional help is warranted. If nightmares occur more than once or twice per week, persist for months, or significantly disrupt daytime functioning, a medical evaluation is appropriate.
See a doctor if nightmares:
- Cause significant distress or fear about going to sleep
- Lead to daytime sleepiness, fatigue, or difficulty concentrating
- Are accompanied by other sleep problems like sleepwalking or thrashing
- Follow a traumatic event and do not improve over time
- Are associated with medication changes — a doctor may adjust the prescription
A primary care doctor can rule out underlying conditions like sleep apnea, which can fragment sleep and increase dream intensity. They can also review your medications to identify potential triggers. If nightmares are related to anxiety, depression, or PTSD, a referral to a psychologist or psychiatrist may be the next step.
There are also medications used for nightmares, but they are typically reserved for severe cases. Prazosin, a blood pressure medication, has been studied for PTSD-related nightmares, though recent research has shown mixed results. Melatonin is sometimes used, but the evidence for its effect on nightmares is limited. Do not start any supplement or medication for nightmares without consulting a doctor.
Can Nightmares Be a Sign of Something Serious?
Most nightmares are benign. But in some cases, they can signal an underlying condition. Sleep apnea, a disorder where breathing repeatedly stops during sleep, can cause fragmented sleep and vivid dreams. If you snore loudly, wake gasping, or feel exhausted despite a full night of sleep, sleep apnea should be considered.
Nightmares can also be a symptom of anxiety disorders, depression, or PTSD. In these cases, the nightmares are part of a broader pattern of symptoms, not an isolated problem. Treating the underlying mental health condition often reduces nightmares as a result.
In rare cases, nightmares are linked to neurological conditions like Parkinson’s disease or REM sleep behavior disorder. In REM sleep behavior disorder, a person physically acts out dreams, sometimes with violent movements. This is different from a nightmare, where the person usually lies still. If you or a partner notice movements during sleep, this needs a medical evaluation.
Nocturnal panic attacks can also be mistaken for nightmares. A panic attack during sleep causes sudden waking with intense fear, rapid heartbeat, and sweating, but the person often cannot recall a specific dream. The distinction matters because the treatment approaches are different.
Frequently Asked Questions
Can eating cheese before bed cause nightmares?
No scientific evidence confirms that cheese causes nightmares. Heavy meals close to bedtime can disrupt sleep, but cheese specifically has not been proven to trigger bad dreams.
How long do nightmares typically last?
Most nightmares last between a few seconds and a few minutes. They occur during REM sleep, which becomes longer and more frequent in the second half of the night.
Is it normal to have nightmares every night?
Nightmares every night are not typical for most adults. Frequent nightly nightmares may indicate an underlying issue like stress, trauma, or a sleep disorder, and a medical evaluation is worth considering.
Does melatonin help stop nightmares?
Melatonin has not been proven to reduce nightmares in clinical studies. It may help with falling asleep, but there is no strong evidence that it changes dream content.

