How to stop nightmares, according to a sleep expert

The image shows a blond-haired woman laying in bed and covering her face with her hands
(Image credit: Getty Images)

Nightmares can be terrifying to experience - but knowing what causes nightmares, as well as identifying lifestyle habits and factors that can make them worse, will help stop bad dreams in their tracks.

There is different advice on how to stop nightmares, so we’ve gathered all the research and expert opinions on why they happen and what you can do to get back to sleep after a nightmare.

It could be stress, scary dreams or even eating too late that's causing you to wake up feeling frightened. With the help of sleep experts, we'll outline the common triggers of nightmares, as well as offering practical advice on how to keep them firmly at bay. Let's get started.

What are nightmares? 

A blonde man covers his eyes with his hands after suffering from a nightmare

(Image credit: Getty Images)

First, let's take a closer look at what nightmares actually are. A nightmare can be a frightening experience regardless of your age. Also known as a bad dream, where something terrifying is happening - when we wake up from a nightmare we often feel mentally and physically shaken.

Although researchers are still trying to figure out the root causes, it’s thought our subconscious is playing out something which we could be worried about happening to us or someone we love.

“Dreaming is thought to be our brain processing the day’s events and helping us regulate our emotions, this leads to speculation that nightmares may be linked to negative emotions and trauma processing while we sleep,” explains Sleep coach Nicole Ratcliffe.

What causes nightmares?

It's more than just horror films that can cause nightmares — although we have some tips on sleeping after scary movies. Certain factors and lifestyle habits can make us more prone to experiencing nightmares.

1. Stress and anxiety  

Stress is one of the biggest triggers of night terrors and nightmares. As our subconscious is on high alert and will therefore affect our dreams, or nightmares. Many studies show the direct link between stress, anxiety and nightmares.

Sleep Expert Andrew Bradley explains that: “Stress and anxiety through your day increases cortisol - and that stimulates your brain. It’s the reason tired people get into bed and then have racing thoughts. Avoiding social media, the news and exciting/scary TV or films before bed also helps with lowering our stress level and avoiding the prospect of scary dreams.”

2. Eating too late 

A blonde woman eats a chocolate gateau from the fridge at night before bed

(Image credit: Getty Images)

Your body needs to know when it’s ready for bed, so if you eat late you’re signaling to the brain that it should be active, explains Bradley: “The timing of eating late, before bed, is a big contributor to nightmares or weird dreams. The process of digesting food after eating late at night throws the body into dysfunction as it has to work hard when it should be shutting down and repairing at night.”

3. Sleep disorders

Several studies suggest that sleep disorders, especially sleep apnea, where you stop breathing when you sleep, can increase the frequency of nightmares. This can be down to the stress on your body or disruption to your sleep cycles. Ratcliffe explains: “Sleep apnea and other sleep disorders can trigger nightmares due to the inability to get quality deep sleep.”

Can you actually stop nightmares? 

Most of us can prevent nightmares by addressing the above triggers, such as trying to eradicate stress from our lives and looking at underlying issues such as sleep disorders. However, there are also steps in which we can stop nightmares, including identifying personal triggers and creating a sleep routine.

How to stop having nightmares — 7 expert tips

There are certain steps you can take to reduce the frequency of your nightmares, and potentially stop them entirely.

1. Identify triggers

Mental load or stress could be one of them - with Ratcliffe explaining that if this is the case you should talk about problems to friends and family – “reducing your mental load allows for better sleep, less stress and worry - meaning less chance of nightmares.”

2. Create a consistent sleep routine  

The image shows a man in bed sleeping deeply on his side

(Image credit: Getty Images)

Is your bed time all over the place? And what about lying in over the weekend? Bradley explains that creating consistent bedtimes is the most important factor for good sleep and hopefully less nightmares.

“Heading to bed in the same 15-minute window every night will align your circadian rhythm. From there, your body will settle into its optimum sleep length (usually 7-8 hours) and you’ll find that you wake up naturally in the same 15-minute window every day.” For more help on creating a consistent sleep routine, check out our guide on how to improve your sleep hygiene.

3. Build sleep pressure throughout the day 

The sleep expert also says we should think of building up to sleep in the same way as packing a suitcase. Except the the destination we're packing for is between 7-9 hours of quality shut-eye. “You keep on layering the clothes in there, pull the lid down to see if it still closes, and then carry on adding to it. The more you pack into your day - physical and mental exertion - helps to build sleep pressure.”

4. Avoid screens before bedtime 

A woman sits up in bed unable to sleep

(Image credit: Getty Images)

Not only can blue light and screen affect our sleep cycles, but the content may also give us nightmares, explains Ratcliffe: “In the run-up to bedtime, avoid screens where you may be looking at the news, or films with violent imagery that could leave worrying thoughts that affect your sleep.”

5. Avoid spicy food

Sleep coach Ratcliffe explains certain foods affect our sleep architecture, these can “trigger irregularities in our sleep causing disturbances - and potentially trigger nightmares. It is thought that spicy food can be one of these triggers - due to difficulty digesting them; increasing our core body temperature while we sleep.”

However, if you are hungry before bed Bradley suggests a small handful of unsalted nuts: “Pistachios are good as they help promote the release of melatonin from their high magnesium content.”

6.  Improve your sleep environment

Being uncomfortable, too hot or too cold or even when you have a lumpy pillow - these are all contributors of a disturbed night's sleep. If you are thinking of investing in a new mattress to improve your sleep environment, our guide to the best mattresses contains top-rated recommendations for all budgets and sleep needs. Plus, with the Labor Day mattress sales in full swing, now is an excellent time to buy any new bedding or sleep accessories you've had your eye on.

7. Increase your daily exercise

A woman and her children walk through a park in the winter sun in order to boost melatonin levels

(Image credit: Getty Images)

If you don’t already have a gym routine, sign up for your local yoga class or go for a walk at lunchtime, as frequent exercise can reduce the time it takes to fall asleep and increase the overall quality sleep. "[Regular exercise] helps reduce sleep onset, the length of time it takes to fall asleep, meaning you are likely to get more overnight sleep,” explains Ratcliffe.

How to go back to sleep after having a nightmare —3 pro tips

Tip 1: Breathwork

“Deep breathing can be effective in calming ourselves down,” says sleep coach Ratcliffe. She suggests certain breathing exercises: “This could be regulated breathing such as in for 4 and out for 7, or box breaths where we breathe in for 4, hold for 4 and out for 4.”

Tip 2: Break the cycle 

Waking up in bed terrified will have certain implications, so if you can’t get back to sleep in the first 5 minutes, get out of bed and do something different, says the sleep coach. “If the content of the nightmare is affecting you, write the concerns down so they are out of your head, and you can process them in the morning.

“You can also read a page or 2 of a book with a soft light on, then get back into bed. Or visualise happy places you’ve been to.”

Tip 3: Body scan 

Body scans, like meditation, bring us back to the present and help us focus on our own bodies, rather than worrying about a nightmare. Start from the top of your body, focussing on how you mentally and physically feel, without changing anything - and gradually go down your body as you scan it.

Sarah Finley

Sarah is a freelance writer who has been published across titles including Woman & Home, The Independent, and the BBC. Sarah covers a variety of subjects, including health and wellness. For Tom's Guide Sarah often writes about sleep health and hygiene, and interviews leading sleep experts about common issues such as insomnia and sleep deprivation.

Read more
A woman sat up in bed holding her head in distress after a night terror, with a Tom's Guide Sleep Week 2025 logo in the top right hand corner
Screaming in the night? Expert reveals 5 causes of night terrors — plus how to stop them
Woman lying awake in bed at night
Can’t sleep after a nightmare? Here are 5 tricks that work for me
A woman lying in bed after waking from a night terror with her hands over her eyes, scared
I asked a parasomnias expert what was causing my night terrors – her answer surprised me
A woman is sat on the end of her bed with her head in her hands as she can't sleep because of nighttime anxiety
My anxiety is worse at night — I asked a neuropsychologist why and how to cope
Young woman is wide awake at night and wants to fall back to sleep fast
Waking up at 3am? Here's 5 reasons you can't sleep through and 5 solutions
A woman with curly black hair stretches and smiles as she wakes up early on a sunny summer's morning
Waking up at night? These 5 daily habits could fix that — here's how
Latest in Sleep Problems
A woman with dark hair lies in bed yawning because she is so tired and ready to sleep
Tired all the time? Sleep experts share how to tackle hypersomnia — plus what might be causing it
A man places a sleep apnea CPAP machine mask on his face, a Tom's Guide Sleep Week 2025 graphic (right)
Sleep apnea could be diagnosed while you're awake, new research finds — here's what that means
A woman wearing a pink eye mask tries mouth taping to cure her sleep apnea.
Forget mouth taping to reduce snoring or sleep apnea symptoms — experts share 5 tips they'd use instead
A woman is sat on the end of her bed with her head in her hands as she can't sleep because of nighttime anxiety
My anxiety is worse at night — I asked a neuropsychologist why and how to cope
A woman lies in bed with her hands covering her face, looking upset due to sleep deprivation. A Tom's Guide Sleep Week 2025 graphic, bottom left
Long-term sleep deprivation has serious health risks — but they can be reversed, says expert
A woman sat up in bed holding her head in distress after a night terror, with a Tom's Guide Sleep Week 2025 logo in the top right hand corner
Screaming in the night? Expert reveals 5 causes of night terrors — plus how to stop them
Latest in How To
An image of an iPhone screen showing the Safari app icon in the center
I got tired of Safari revealing my web searches in iOS 18.4 — this setting fixes that
Gmail logo on iPhone
I used Google Gemini to declutter my Gmail account — here's how you can do it too
AirPods Pro 2 in hand
Your earbuds are disgusting — here's the right way to clean them
ChatGPT logo on a smartphone screen being held outside
7 biggest ChatGPT mistakes — and how to fix them
a photo of a woman looking at her fitness tracker
Forget the treadmill — I boosted my metabolism and walked 2,000 steps with this 15-minute workout
a photo of a woman out for a walk
Forget running — I did this one thing to boost the calorie burn on my daily walks