Why do people get nightmares? Plus, 10 ways to treat them
Clinically reviewed by Dr. Chris Mosunic, PhD, RD, MBA
No one likes waking up in a cold sweat, but why do people have bad dreams? Explore the reasons why people get nightmares and how loneliness may play a role.
I think we can all agree, having nightmares is the worst. No one likes waking up in the middle of the night, heart racing and covered in sweat after a bad dream. They can be deeply unsettling, and for some people they may linger in your mind long after you wake up. And if you value your sleep or have been dealing with sleep deprivation, having a night of interrupted sleep brings its own level of stress.
In some cases, nightmares are rare and may only happen after a stressful day or a scary thriller movie. But for some people, nightmares are a frequent and unwelcome part of their nights, disrupting sleep and affecting how they feel during the day.
So why do we get nightmares in the first place? Is it just random, or is there something deeper going on? Let’s dive in.
Why do people get nightmares?
Nightmares are more than just bad dreams — they’re vivid and distressing experiences that can jolt you awake, and leave you feeling shaken. They happen during the REM (rapid eye movement) stage of sleep, which is when most dreaming occurs. And because you’re usually more deeply asleep during REM, nightmares can feel especially real.
These bad dreams often stem from your mind trying to process something stressful, emotional, or even physiological. Everyone has an occasional bad dream, but frequent nightmares may be flagging specific triggers or underlying issues.
Here are a few triggers you may want to be on the look out for if you’ve been having bad dreams on the regular:
Stress and anxiety: High levels of stress can overwhelm your mind, leading to disturbing dreams.
Trauma: Experiencing or remembering a traumatic event can increase the likelihood of nightmares.
Sleep disorders: Conditions like sleep apnea or insomnia can disrupt your sleep, making nightmares more frequent.
Medications: Certain medications, such as antidepressants or blood pressure drugs, can cause nightmares as a side effect.
Lifestyle habits: Drinking alcohol, eating right before bed, or irregular sleep schedules can interfere with your REM sleep, sometimes resulting in bad dreams.
What role does loneliness play in nightmares?
Loneliness can affect your mind, body, and even your dreams. While it might not seem obvious at first, feeling isolated or disconnected can play a big role in the quality of your sleep and whether or not you have nightmares.
We all know that loneliness can make us feel sad or stressed, but research shows it can also heighten your brain’s stress response. This increased emotional burden may spill over into your dreams, leading to vivid and distressing nightmares.
Increased stress: When you’re lonely, you might feel more overwhelmed by life’s challenges, which can seep into your dreams.
Hyperarousal: Loneliness may make your nervous system more reactive, leading to restless sleep and vivid dreams. Feeling off? Here’s 13 tips to regulate your nervous system.
Lack of emotional support: If you’re struggling with feelings or experiences and don’t have someone to talk to, your mind may process those emotions through nightmares.
If you’ve been feeling lonely and struggling with bad dreams, there are ways to address both issues. Studies show that people with strong social ties tend to sleep better and experience fewer nightmares. Even if you’re not ready to share your struggles with someone, simply spending time around others can make a difference in how you feel and, ultimately, how you sleep.
If loneliness feels overwhelming, reaching out to a therapist or joining a support group can provide a safe space to share your feelings and start building a stronger sense of connection.
What is the impact of nightmares on mental health?
We’ve all heard the phrase, “it was only a dream” but the truth is that nightmares can affect your mental health. Waking up from a bad dream may leave you feeling unsettled and anxious. They might even make you afraid to go back to sleep, which is a problem because sleep is so important for both physical and mental health.
If you’ve been struggling with recurring nightmares, knowing how they might be affecting your emotions and overall health can support you in finding relief. Here’s a few ways they can manifest IRL.
Increased anxiety
Nightmares can create a fear of going to sleep, especially if you’ve been waking up feeling scared or shaken night after night. This fear can lead to sleep avoidance, which only worsens anxiety and sleep deprivation.
Depression
Chronic nightmares are often linked to feelings of sadness, hopelessness, or emotional exhaustion. Waking up from disturbing dreams can leave you drained, making it harder to feel positive or motivated during the day. So if you’re feeling a bit “blah” lately, these nine tips can help you get through a tough day.
Intrusive thoughts
After a nightmare, it’s common to replay parts of the dream in your mind, especially if it felt vivid or tied to real-life worries. These lingering thoughts can increase stress and make it harder to focus on other things — but here are 10 ways to manage them.
Reduced emotional resilience
Poor sleep caused by nightmares can make it harder to manage stress or regulate emotions. You might feel irritable, overwhelmed, or more reactive to everyday challenges. These nine tips can help you regulate your emotions.
How to treat nightmares: 10 mindful tips to sleep more peacefully
If getting nightmares under control is your goal there are a few effective ways you can start managing them tonight. From improving your sleep habits to addressing underlying stress or trauma, treating nightmares is all about finding what works best for you — and creating a consistent routine to support better sleep.
1. Create a calming bedtime routine
Your evening habits set the tone for how well you’ll sleep. Spend 30–60 minutes before bed doing activities that help you unwind, such as reading a book, listening to calming music, or practicing gentle stretches. Try to avoid screens during this time, as the blue light can disrupt your body’s natural sleep signals.
💙 Press play on our Sleep Story Melodies playlist during your bedtime routine to ease into dreamland.
2. Practice relaxation techniques
Stress is one of the most common triggers for nightmares, so learning how to calm your mind and body can make a big difference. Try deep breathing exercises (here are eight we like), progressive muscle relaxation, or guided meditation before bed.
💙 Learn 11 tools to help you find your calm during the Overcoming Stress and Anxiety series with Dr. Julie.
3. Reframe your nightmares with imagery rehearsal therapy (IRT)
If you have a recurring nightmare, IRT is a technique that may help. While awake, visualize the nightmare but change the storyline to make it less distressing.
If your dream involves being chased, imagine yourself finding a safe hiding spot or confronting the chaser. Practicing this during the day can reduce the emotional intensity of the nightmare and help you feel more in control.
4. Address any underlying trauma or stress
If your nightmares are linked to past trauma or ongoing stress, consider seeking help from a therapist. Trauma-focused therapies, such as cognitive-behavioral therapy (CBT) or EMDR (eye movement desensitization and reprocessing), can help you process difficult emotions and memories. Reducing the emotional charge around these experiences can lead to more peaceful sleep.
5. Improve your sleep environment
Your bedroom should feel like a safe, relaxing space. Keep it dark, cool, and quiet to promote deep sleep.
If outside noise or light is a problem, try blackout curtains, white noise machines, or earplugs. And make sure your mattress and pillows are comfortable and supportive.
6. Limit stimulants and heavy meals before bed
Caffeine, alcohol, and large meals can disrupt your sleep cycle, which can make nightmares more likely if you’re already prone to them. So try to avoid caffeine in the afternoon and evening, and finish eating at least two hours before bedtime. If you need a bedtime snack, choose something light and easy to digest, like a banana or a handful of nuts.
7. Stick to a consistent sleep schedule
Going to bed and waking up at the same time every day helps regulate your internal clock, making your sleep more restful. Try to maintain this routine even on weekends to create a strong, consistent sleep pattern.
8. Focus on positive imagery before sleep
Instead of worrying about your day or replaying stressful moments, spend a few minutes before bed visualizing something pleasant. Imagine yourself in a peaceful place, like a beach or forest, and focus on the details — the sound of the waves, the warmth of the sun, or the rustling leaves. This positive imagery can help set the stage for calmer dreams.
💙 Try a peaceful visualization meditation before bed to soothe your mind, like A Woodland Stroll to Sleep with Professor Megan Reitz.
9. Consider professional help if needed
If nightmares persist, you may want to consult a healthcare provider or sleep specialist.
They can help identify underlying causes, such as sleep disorders or medical conditions, and recommend appropriate treatments.
10. Don’t be afraid to talk about your nightmares
Nightmares can feel isolating, but sharing your experiences can help lighten the burden. Whether it’s a friend, family member, or therapist, talking through your dreams with someone you trust can help you feel supported and less alone in managing them.
Why do people get nightmares FAQs
Does loneliness increase nightmares?
Yes. Feeling isolated or disconnected can create emotional stress, which often seeps into your sleep. Loneliness is known to heighten feelings of anxiety and sadness, both of which are common triggers for bad dreams.
Loneliness also affects your overall sleep quality. Studies have shown that people who feel isolated often sleep less deeply and wake up more frequently. These disruptions can make your sleep cycles less restorative, leaving you more vulnerable to nightmares.
Building even small social connections—like reaching out to a friend, joining a group, or simply talking to someone you trust—can help reduce feelings of loneliness and improve your sleep.
If you’re struggling with loneliness, these seven tips can help you cope.
Is there a link between trauma and nightmares?
Trauma has a profound impact on both your waking life and your dreams. If you’ve been through a traumatic experience, whether it happened recently or long ago, your brain could be attempting to process it as you sleep.
Memory processing during REM sleep: REM sleep is a time when your brain sorts through memories and emotions. For people who’ve experienced trauma, this process can bring up vivid images or feelings tied to the event. These memories may resurface in dreams, often in a way that feels chaotic, frightening, or out of control.
Hyperarousal and heightened emotions: Trauma can leave your nervous system in a state of high alert. This makes it harder to relax, even during sleep, and can increase the likelihood of nightmares. If you’ve experienced post-traumatic stress disorder (PTSD), you may find these nightmares are particularly intense and recurring.
Triggers in daily life: Sometimes, reminders of a traumatic event—like certain smells, sounds, or even stress—can influence your dreams. Your subconscious might pick up on these triggers and incorporate them into your nightmares.
If trauma-related nightmares are affecting your ability to function, seeking professional help is necessary. Treatments like cognitive-behavioral therapy (CBT) and imagery rehearsal therapy (IRT) can help you reframe these dreams and reduce their frequency. In some cases, medication may also be recommended to improve sleep and manage symptoms.
Is there a treatment for nightmares?
When treating nightmares, a good starting point is to identify any potential triggers, such as stress, trauma, or certain medications, and work to address them. If stress is a major factor, relaxation techniques like deep breathing, meditation, or journaling can help calm your mind before bed. (Here are seven tips for getting started with journaling.)
For recurring nightmares, a therapy called imagery rehearsal therapy (IRT) has been shown to be effective. This involves reimagining your nightmare while awake and changing the storyline to make it less distressing. Over time, this can reduce the emotional impact of the nightmare and decrease its frequency.
If your nightmares are tied to trauma, trauma-focused therapies like cognitive-behavioral therapy (CBT) or EMDR can help address the root cause. For some people, medications might also be an option to regulate sleep or reduce nightmares.
If nightmares are affecting your quality of life, talking to a healthcare provider or sleep specialist can help you find the right treatment plan.
Can diet cause nightmares?
What you eat or drink can influence your sleep and may contribute to nightmares. Spicy, heavy, or greasy foods consumed close to bedtime can interfere with digestion, which may lead to disrupted sleep and unsettling dreams. Sugary snacks or foods that cause blood sugar spikes can also impact how your brain processes sleep, sometimes leading to vivid or intense dreams.
Drinking caffeine in the afternoon or evening can make it harder for your body to wind down, potentially increasing the chance of vivid dreams or nightmares. Alcohol may initially help you fall asleep but can disrupt your REM sleep later in the night, which is when most dreaming occurs.
To minimize the risk of nightmares, try to finish your meals at least two to three hours before bedtime and opt for lighter, easy-to-digest foods in the evening. If you need a snack, choose calming options like a small handful of nuts, a banana, or a warm glass of milk.
Are nightmares linked to any physical health conditions?
Certain physical health conditions can be associated with frequent nightmares. Sleep disorders, such as sleep apnea or restless legs syndrome, can disrupt your sleep cycles and make nightmares more likely. Sleep apnea, in particular, causes brief pauses in breathing during sleep, which can lead to fragmented and vivid dreams — if this is an issue for you, try these six self-care tips.
Other conditions, like migraines or chronic pain, may also contribute to nightmares because they interfere with your ability to get restorative sleep. Hormonal changes—such as those that occur during pregnancy or menopause—can affect sleep patterns and lead to more intense dreaming.
If you suspect a physical health condition is contributing to your nightmares, it’s important to consult a healthcare provider. Treating the underlying condition can often lead to significant improvements in both sleep quality and the frequency of nightmares.
Can medications cause nightmares?
Some medications can have nightmares as a side effect. Medications that affect brain chemistry, such as antidepressants, beta-blockers, or sleep aids, are more likely to contribute to vivid or unsettling dreams. Some antidepressants impact how your brain regulates serotonin, which can alter your REM sleep patterns and lead to more intense dreaming.
Other medications, like those for high blood pressure or asthma, may also influence your sleep and dream cycles. If you’ve recently started a new medication and noticed an increase in nightmares, it’s worth discussing this with your doctor. They may be able to adjust your dosage, switch you to a different medication, or recommend strategies to manage the side effects.
If you can’t change your medication, focusing on improving your overall sleep hygiene—like maintaining a consistent bedtime routine, managing stress, and optimizing your sleep environment—can help reduce the impact of nightmares. You can also check out these six tips for better quality sleep.
Calm your mind. Change your life.
Mental health is hard. Getting support doesn't have to be. The Calm app puts the tools to feel better in your back pocket, with personalized content to manage stress and anxiety, get better sleep, and feel more present in your life.