GUIDE · SLEEP

Imagery rehearsal therapy: how to rewrite a recurring nightmare and rehearse the new version

It's 3 a.m., and you're awake after the same dream again: the long hallway, the door that won't lock, the footsteps getting closer. Imagery rehearsal therapy (IRT) works on that dream in daylight. You pick a nightmare that keeps coming back, change it any way you like, write down the new version, and picture it for 10 to 20 minutes every day.

Reviewed by our editors~10 min read

What imagery rehearsal therapy is and where it comes from

Imagery rehearsal therapy is a technique adapted from cognitive behavioral therapy (CBT) for nightmares that keep coming back. The American Academy of Sleep Medicine (AASM) describes it as changing a nightmare's content into a new set of positive images. You then rehearse the rewritten dream for 10 to 20 minutes a day while you're awake. You'll also see it called nightmare rescripting. Our guide to nightmares covers why they happen.

The method grew out of work by Krakow and colleagues in New Mexico. In a 1992 study from that group, one session of instructions to change a nightmare and rehearse the new version cut nightmare frequency, though a session of desensitization worked about as well. A 1995 trial in 58 people with chronic nightmares found clear drops compared with a wait list. A 2001 trial in JAMA randomized 168 women, nearly all with posttraumatic stress disorder (PTSD) and a history of sexual assault, to three sessions of IRT or a wait list. A 2006 clinical account by Krakow and Zadra lays IRT out over four sessions of about two hours each. Rehearsal as a treatment for nightmares shows up even earlier, in a 1978 case report of a nightmare that had recurred for 14 years and disappeared quickly after it was rehearsed.

Before you start: when to bring in a clinician or a doctor

Nightmares tied to a trauma or PTSD: Work on these with a trauma-trained clinician, not alone. A 2022 review of nightmare rescripting in PTSD warns that working with disturbing images can bring up intrusive images of the traumatic event, which can be overwhelming and can provoke dissociation. In the protocol it describes, the therapist teaches grounding first and checks that you can handle what comes up before any nightmare is chosen. Even in the 2001 trial, four participants developed negative imagery and eventually withdrew.

If rehearsing a dream brings on flashbacks, or the sense that the event is happening again, stop. Use a grounding exercise like 5-4-3-2-1, and talk to a clinician before you try again. Not sure whether a past event is part of the picture? Our trauma and stress test uses a short PTSD screen that can help you decide whether to talk to someone.

Signs of sleep apnea: A 2009 AASM guideline lists daytime sleepiness, loud snoring, breathing pauses someone else notices, and waking up gasping or choking. A 2021 review says apnea has been reported to play a role in nightmares, though that's disputed. In one sleep clinic study of 99 people with apnea and nightmares, the nightmares disappeared in 91% of those who used CPAP treatment consistently, compared with 36% of those who refused it. If the signs fit, ask a doctor about a sleep study first.

Medicines and alcohol: The same 2021 review names beta-blockers, some SSRI antidepressants, and alcohol withdrawal among things that may provoke nightmares. If yours started or got worse after a new medicine or a dose change, or after you cut back on drinking, tell your doctor. Don't stop a prescribed medicine on your own.

Sleepwalking or acting out dreams: If you walk in your sleep, or a partner says you punch or kick as if you're living the dream, see a doctor before working on the dreams themselves. The 2021 review says a sleep history should cover sleepwalking and dream enactment, and notes that nightmares can be part of other sleep disorders, including REM sleep behavior disorder. A Mayo Clinic Proceedings review describes that disorder as acting out dreams and calls it possibly the most common reversible cause of sleep-related injury. It's also strongly linked with Parkinson disease.

Which nightmare to start with

In the clinic protocol the 2022 review describes, the first target is usually the most upsetting nightmare or the most frequent one, which are often the same dream. It adds that some people are asked to begin with a less intense nightmare so they don't feel overwhelmed. On your own, we'd pick the milder one. A good first choice comes back often enough that you'd notice a change, doesn't leave you shaking when you think about it, and isn't a replay of something that actually happened to you.

If every recurring dream you have feels too intense to touch, take that as a reason to do this with a therapist.

Imagery rehearsal therapy steps: how to rewrite a nightmare

These steps follow the parts of imagery rehearsal that the 2012 meta-analysis lists: write a new version of one nightmare with something changed, then rehearse it in your imagination every day. Its list also includes sleep education, and clinic versions add sessions with a therapist. Go through the safety section above before you begin.

  1. Pick one nightmare. Choose a recurring dream on the milder side that isn't a replay of a real event. Leave the others alone for now.
  2. Sketch the old version in a line or two. Write just enough to know which dream you're changing, such as "I'm in a hallway and someone is following me." Some clinic protocols have you write it out in full detail with a therapist. On your own, a short outline is gentler.
  3. Change it any way you like. In one study of how people rewrote their nightmares, most gave the dream a new ending. Others added new positive images, made the threatening parts less frightening, or put in a reminder that it's only a dream.
  4. Write the new version as a short scene. Use the first person and include what you see and hear, so it's easy to picture. A few sentences to a page is plenty.
  5. Rehearse it every day. Picture the new version for 10 to 20 minutes a day while you're awake, the range the AASM paper gives. The 2022 review suggests doing it before sleep if you can. Rehearse only the new dream. If the old one starts to play, steer back to your version.
  6. Track nights with nightmares. Each morning, note whether the nightmare came and, if it did, how it had changed and how bad it felt. The 2001 trial counted nights with nightmares per week, and a weekly count shows change that's easy to miss.
  7. Give it about six weeks. The self-help program in the largest trial we found ran for six weeks. If the nightmare hasn't eased by then, or rehearsal leaves you more upset than before, take your notes to a clinician.

If rehearsal ever brings on flashbacks, stop, ground yourself, and take it to a trauma-trained clinician before going on.

Three made-up examples

These three people are made up. They show how the steps might go and aren't case studies or evidence of any result.

Maya keeps dreaming that she's back in a school exam and can't read the questions. Since it isn't tied to any one event, it's her first pick. In her rewrite, the words come into focus, and she walks out early into a sunny parking lot. She pictures it before bed.

Andre dreams of floodwater rising in his house. His first rewrite, where he swims to safety, still makes him tense. In the second, the water is only ankle-deep, and he wades to the kitchen and makes coffee. It feels a little ridiculous, and it's much easier to rehearse.

Rosa wants to rewrite a dream that replays a car crash she was in. When she pictures it, her heart races and she feels like she's back on the highway. She stops, grounds herself, and saves this dream for a trauma-trained therapist, practicing meanwhile on a milder one about missing a flight.

Common snags and what to do

If the rewrite feels silly: That's fine. Krakow's team sums up the instruction as "change the nightmare any way you wish," so the new version doesn't need to be realistic or clever. It only needs to be something you can picture and don't mind picturing every day. If a version still makes you tense, change it again, the way Andre did.

If recalling the nightmare is upsetting: Spend your rehearsal time on the new version only, as the 2022 review advises, and keep the old one to a one-line label. If your distress keeps climbing, stop and ground yourself. Researchers disagree about how much contact with the original dream helps. A 2013 meta-analysis linked more time on the nightmare's content to bigger gains, while a 2010 self-help trial found rewriting and exposure to the nightmare worked about equally well. Try more exposure only with a therapist.

If the nightmare changes shape: Sometimes the dream returns with a new setting or threat, or another nightmare takes its place. You can rewrite the new version too, and in two early trials people were told to keep using the technique whenever they had nightmares or as needed. In a 1992 study, two participants said their nightmares got more severe even as they came less often, so log how bad each one feels as well as how often it comes.

If nothing changes after a few weeks: Check that you're picturing the new version every day, not just rereading it. Then look at the safety list again, because nightmares with a physical cause need a doctor.

What the research does and doesn't say

The AASM's 2018 position paper recommends imagery rehearsal therapy for both PTSD-related nightmares and nightmare disorder. It's the only treatment in the paper rated "recommended"; the rest are options that "may be used" or aren't recommended. The AASM chose a position paper over a full guideline because direct evidence for many treatments was limited. The World Sleep Society endorsed the paper in 2025.

Pooled results look strong, but many are before-and-after changes, not comparisons with another treatment. A 2012 meta-analysis of 13 studies of post-trauma nightmares found large drops in nightmare frequency and PTSD symptoms, plus better sleep quality, lasting 6 to 12 months. Its one study with an active comparison treatment showed small effects. A 2013 meta-analysis of 19 randomized trials of nightmare treatments found an overall effect of d = 0.48 for psychological ones, and individual therapy did better than self-help.

Not every trial was positive. In 124 Vietnam veterans with chronic, severe PTSD, six group sessions of imagery rehearsal did no better than a comparison treatment with equal therapist contact. Self-help has some support. In a Dutch trial of 399 people recruited through a nightmare website, a six-week self-help version cut nightmare frequency more than a wait list or a nightmare diary did. The gains largely held 42 weeks after the program ended, and the diary alone also beat the wait list. In the 2012 analysis, adding CBT for insomnia improved sleep quality more than imagery rehearsal alone.

Draft your rewrite

The chat below runs with Helpy, the site's AI assistant. Describe your nightmare in a sentence or two, and it can help you brainstorm changes and shape a new version you can rehearse. It can't tell whether your nightmares are tied to trauma or a sleep disorder, so take that question to a clinician.

Evidence and sources

When to get help

See a doctor or therapist if nightmares come most weeks, if you dread going to sleep, or if they leave you worn out and on edge during the day. Get help sooner if the nightmares started after a traumatic event, replay something that happened, or come with flashbacks. A sleep specialist can check for apnea and other sleep disorders, and a trauma-trained therapist can guide IRT or offer other treatment for PTSD.

Important

This is educational self-help content, not a substitute for professional care. If anxiety is intense, sticks around for weeks, or makes daily life hard, reach out to a mental-health professional or doctor. If you’re in crisis or thinking about suicide, get help now: call or text 988 (988 Suicide & Crisis Lifeline), text HOME to 741741 (Crisis Text Line), or call 911 for emergencies. Available 24/7.

← All CBT guides