What Nightmares Are (and Why Your Brain Makes Them)
March 27, 2026
What Nightmares Are (and Why Your Brain Makes Them)
You wake up at 3am, heart hammering, relieved that none of it was real. The dream was vivid and awful and it's already starting to dissolve. You lie there in the dark wondering why your brain would do that to you.
It feels like a malfunction. Like your mind turned against itself while you were sleeping.
It didn't.
Nightmares are one of the most misunderstood things that happen to us. They feel random, cruel, pointless. But there's a coherent explanation for why they exist, what purpose they serve, and when they cross the line from normal to something worth paying attention to.
The Threat Simulation Theory
In 2000, Finnish philosopher and cognitive neuroscientist Antti Revonsuo published a paper in Behavioral and Brain Sciences that reframed how researchers think about dreaming.
Revonsuo proposed what he called the Threat Simulation Theory. The core idea: dreaming evolved primarily as a biological mechanism for rehearsing threatening situations. Dreams about danger, conflict, failure, and loss aren't random noise. They're your brain running threat simulations, testing your responses to scenarios you haven't actually faced.
Think of it as a flight simulator. Pilots train in simulators precisely because the consequences of failure there are zero. You can crash the simulator a hundred times and walk away. You develop instincts and pattern recognition for scenarios that would be catastrophic to encounter for the first time in the air.
Revonsuo argues that dreams serve the same function. In the dream, you are being chased, and you're afraid, and you run. The emotion is real even if the threat isn't. Your nervous system is rehearsing. If something like this ever happens in waking life, you won't encounter it cold.
Nightmares, in this framework, are what happens when the threat simulation system gets highly activated. They're not malfunctions. They're an intensified version of ordinary dream function, running at high volume.
This doesn't make nightmares comfortable. But it does mean they have a logic to them.
What Causes Nightmares
For most people, most of the time, nightmares track stress. When your waking life contains more perceived threat, your threat simulation system runs harder at night.
Stress and anxiety are the most commonly reported triggers. Deadlines, relationship conflict, financial pressure, health worry, major life transitions: all of it can feed into more frequent and more distressing dreams. The content often maps loosely onto the stressor, though dreams rarely depict the actual situation. More often, the emotional tone transfers. Anxiety at work might produce dreams about being chased, being unprepared for an exam, or losing something important.
Trauma-related nightmares are a distinct category. In post-traumatic stress disorder, nightmares often replay or closely approximate the traumatic event itself, sometimes with near-photographic fidelity. This is different from ordinary stress-related nightmares and is understood as part of the broader PTSD presentation rather than a separate sleep condition. Intrusive trauma nightmares can be one of the most disruptive symptoms of PTSD, fragmenting sleep and reinforcing hypervigilance.
Several physiological factors also increase nightmare frequency. Certain medications, including some antidepressants and blood pressure drugs, are associated with more vivid and disturbing dreams. Alcohol suppresses REM sleep during the early part of the night and then produces a REM rebound later, which can generate intense and chaotic dreams. Alcohol withdrawal, in more severe cases, can cause extremely distressing nightmares and sleep disruption. Sleep deprivation itself tends to increase nightmare frequency, partly through a similar REM rebound effect.
When Nightmares Become a Problem
Having a nightmare is not a disorder. Everyone has them.
Most people experience nightmares occasionally throughout their lives. They're unpleasant and then they fade. The next night is usually fine.
The clinical threshold is crossed when nightmares become frequent, distressing, and functionally impairing. Nightmare disorder is a recognized sleep condition defined by recurrent nightmares that cause significant distress or disruption to sleep, and that begin to affect waking function: mood, concentration, relationships, willingness to go to bed.
Research suggests that nightmare disorder affects roughly 2 to 8 percent of the general adult population, with higher rates in people with PTSD, anxiety disorders, and depression. The 2 to 8 percent estimate comes from population studies using standardized criteria and is a reasonably consistent finding across the research literature, though the exact figure varies by how the disorder is defined and measured in a given study.
The distinction matters because it changes what kind of response is appropriate. Occasional nightmares after a period of stress are normal and usually self-limiting. They tend to decrease as the stressor resolves. Nightmare disorder is something different: nightmares that persist regardless of waking circumstances, that occur multiple times per week, and that produce enough distress that the person begins to dread sleep itself.
If you recognize that pattern in yourself or someone you know, it's worth taking seriously. Nightmare disorder is treatable.
What Actually Helps
Image Rehearsal Therapy
The most well-supported treatment for recurrent nightmares is something called Image Rehearsal Therapy, or IRT.
The technique was developed and studied extensively by sleep researcher Barry Krakow, whose randomized controlled trials showed meaningful reductions in nightmare frequency and severity in people with PTSD-related nightmare disorder. The results were significant enough that IRT is now considered a first-line treatment in clinical guidelines for nightmare disorder.
The method is counterintuitive but straightforward. During waking hours, you write down one of your recurrent nightmares. Then you change the ending. You don't have to make it pleasant, just different. You write the new version of the dream as a story and then rehearse it, reading it over and re-imagining it until the new version feels relatively familiar.
You're not trying to stop the nightmare. You're replacing its narrative shape. Over time, the brain appears to update the script it's running. Nightmare frequency drops. The content shifts. The emotional intensity decreases.
Why does this work? The precise mechanism isn't fully understood, but the working theory is that IRT leverages the same mental imagery systems that generate dreams in the first place. You're essentially rehearsing a new version until it becomes the more accessible template.
IRT is typically done with a therapist trained in the technique, but the core method has also been studied in self-guided formats. If nightmare disorder is affecting your life, asking a therapist about IRT is a reasonable starting point.
Reducing Pre-Sleep Stress and Screen Exposure
Outside of clinical intervention, the most accessible lever is what you bring to bed with you.
Matthew Walker, a neuroscientist and sleep researcher at UC Berkeley, has written and spoken extensively about the relationship between REM sleep and emotional processing. His argument, developed across years of research, is that REM sleep is partly a mechanism for processing difficult emotional experiences and reducing their affective charge over time. Sleep is not a passive state; it is doing active work on the emotional residue of the day.
The implication: a nervous system that arrives at bedtime still running at high activation is more likely to produce distressing dream content. This is partly why pre-sleep wind-down matters. Not because relaxation rituals are magic, but because your brain needs some distance from the day's threat load before it can shift into the gentler phase of processing.
Reducing screen exposure in the hour before bed is one of the better-supported suggestions here, less because of blue light (the effect is real but modest) and more because screens tend to deliver emotionally activating content. News, social comparison, conflict in messages, absorbing narratives: all of it can extend the window of elevated arousal before sleep.
The bar doesn't need to be high. Fifteen to thirty minutes of something low-stakes before bed is genuinely useful for a lot of people.
Addressing the Underlying Anxiety or Trauma
This one is easy to overlook in favor of sleep-specific interventions, but it's probably the most important.
Nightmares, in the Threat Simulation framework, are a symptom. They are your threat system communicating something about the overall level of perceived danger in your life. When nightmares are frequent and persistent, they are almost always downstream of something else: sustained anxiety, unresolved trauma, chronic stress that hasn't had room to discharge.
IRT and sleep hygiene can reduce nightmare frequency on their own. But the most durable resolution usually comes from addressing what's feeding the system. Effective treatment for anxiety disorder tends to reduce nightmare frequency. Processing trauma, whether through EMDR, prolonged exposure therapy, or other evidence-based trauma treatments, tends to reduce the PTSD nightmares that are among the most disruptive.
This is not to say that sleep interventions are only symptomatic. IRT appears to have genuine therapeutic effects beyond just the nightmares. But if the nightmares are severe, treating only the sleep while leaving the underlying driver untouched has limits.
The Part Worth Remembering
Nightmares feel like your brain has turned hostile. They don't feel purposeful. They feel random and unpleasant and confusing.
But Revonsuo's framework offers something more useful than that. Your brain is not punishing you. It is doing something it evolved to do: running simulations of threat so that you're not encountering those emotional and behavioral challenges for the first time in real life. When that system runs at high intensity, it produces nightmares.
That doesn't make them fun. But it does give you somewhere to look.
If your nightmares are occasional, they'll likely pass as the stressors that are feeding them resolve. If they're frequent, distressing, and affecting your sleep or your day, that's worth addressing directly. The tools exist.
If you're trying to understand your dreams more deeply, the doz.ing dream interpreter is a place to start. You can bring a dream and explore what your mind might be working through.
This article is for informational purposes only and is not a substitute for professional medical or psychological advice. If you are experiencing frequent, distressing nightmares, difficulty sleeping, or symptoms of PTSD or anxiety disorder, please consult a qualified healthcare provider.
References
- Revonsuo, A. (2000). The reinterpretation of dreams: An evolutionary hypothesis of the function of dreaming. Behavioral and Brain Sciences, 23(6), 877-901.
- Krakow, B., Hollifield, M., Johnston, L., Koss, M., Schrader, R., Warner, T. D., Tandberg, D., Lauriello, J., McBride, L., Cutchen, L., Cheng, D., Emmons, S., Germain, A., Melendrez, D., Sandoval, D., and Prince, H. (2001). Imagery rehearsal therapy for chronic nightmares in sexual assault survivors with posttraumatic stress disorder: A randomized controlled trial. JAMA, 286(5), 537-545.
- Walker, M. (2017). Why We Sleep: Unlocking the Power of Sleep and Dreams. Scribner.
- American Academy of Sleep Medicine. International Classification of Sleep Disorders, Third Edition (ICSD-3). Nightmare disorder classification and prevalence estimates.
- Sandman, N., Valli, K., Kronholm, E., Revonsuo, A., Laatikainen, T., and Paunio, T. (2015). Nightmares as predictors of suicide: An extension study including war veterans. Scientific Reports, 5, 14312. (Cited for nightmare prevalence and epidemiology context.)
More in Dream Interpretation
The Relationship Between Anxiety and Your Dreams
Anxiety does not just affect how you sleep. It changes what you dream about and how those dreams feel. Here is what the research says about why that happens, and what it means for you.
Dreams and Grief: What Happens When We Dream About Loss
When you are grieving, your dreams change. You see people who are gone. You wake up and have to lose them again. Here is what research tells us about why this happens and what it might mean.
What Recurring Dreams Are Actually Telling You
You are running, but you cannot move fast enough. Or you are back in school, and there is an exam you forgot to study for. Or your teeth are loosening, one by one, and you are holding them in your han...