Skip to main content

If you’ve ever struggled to fall asleep, chances are you’ve heard about melatonin (and maybe even tried it yourself). Melatonin, a hormone our bodies naturally produce in preparation for sleep, is available as an over-the-counter supplement to help you fall asleep and stay that way through the night. But despite its popularity, there are also some significant side effects to be aware of, and and experts generally agree that it isn’t a long-term solution to your sleep problems. Among the more surprising drawbacks to the sleep supplement? Melatonin nightmares.

The concept of melatonin-induced dreams is not uncommon, with #MelatoninNightmares racking up over 36,000 views on TikTok with users detailing their experiences using the supplement and the vivid, scary dreams that often accompany it. “I literally had to stop taking it because I have the craziest nightmares,” one user wrote in the comments section of one such TikTok. “I def got heavy feelings of impending doom and CRAZY nightmares,” another agreed. Given all this anecdotal evidence, you may be wondering: Can melatonin actually cause nightmares?

To find out, we asked sleep experts. Read on to see what they had to say about the supplement, including whether melatonin can cause nightmares, why this might happen, and how to stop them (plus, a few things you can do to get a more peaceful night’s sleep).


Experts Featured in This Article

Lisa Medalie, PsyD, is a board-certified behavioral sleep medicine specialist and CEO of insomnia management network DrLullaby.

Kristen Willeumier, PhD, is a neuroscientist with research expertise in neurobiology and neuroimaging.


Can Melatonin Cause Nightmares?

If you’ve had terrifying dreams while taking melatonin, you’re not alone. While there isn’t a direct link between melatonin and nightmares, there are a few theories as to what might be happening. For starters, while melatonin may help you fall asleep faster, according to Lisa Medalie, PsyD, it can also cause you to stay in the deeper stages of sleep for longer. This could potentially open the door for more vivid or intense dreams.

“Most people take melatonin because they are experiencing difficulty falling asleep, returning to sleep, or insufficient sleep,” Dr. Medalie says. If you’re struggling with any of those things, chances are you’re not sleeping long enough to experience periods of rapid eye movement (REM) sleep. “If melatonin is helpful and keeps such individuals asleep for longer, they may then actually experience longer and possibly higher-density REM sleep,” Dr. Medalie says. “With longer bouts of REM from longer sleep periods – and even more likely, with higher-density REM sleep – this allows for the potential of more vivid or intense dream content, as dreams occur during REM sleep.”

Kristen Willeumier, PhD, agrees, citing research that suggests melatonin can normalize REM sleep percentage as well as REM sleep quality. “While it is currently unclear why melatonin causes nightmares, it is most likely due to its effects on REM sleep, a stage of the sleep cycle when we experience vivid dreams,” Dr. Willeumier tells PS. “Dreams are a time when we can be exposed to fear-inducing stimuli (i.e., stress, anxiety, and worry) in a safe environment.” In this case, melatonin itself might not be the cause of your bad dreams, but the deep sleep it facilitates definitely sets the stage for more vivid nightmares.

How to Stop Melatonin Nightmares

If you suspect melatonin is causing your nightmares, consider trying some alternative techniques to help you fall asleep at night. Dr. Willeumier recommends the following:

  • Establish a consistent sleep schedule
  • Exercise regularly
  • Refrain from eating three hours prior to sleep
  • Avoid caffeine after 3 p.m.
  • Abstain from alcohol before bed
  • Dim the lights in the evenings
  • Use filters to block blue light from computer screens and smartphones
  • Keep your bedroom on the cool side (between 60 and 67 degrees)

If these sleep-inducing habits aren’t enough, talk to your doctor. The solution may be as simple as incorporating some stress-relieving activities into your evening routine, or your doctor may prescribe a different medication or therapy altogether. They will also be able to assess whether melatonin is actually the cause of your bad dreams, and help you find an alternative solution if necessary.

When to See a Doctor

“In general, if you are taking any over-the-counter or prescription medication that is producing unpleasant side effects, it is appropriate to talk to your doctor about how to safely discontinue,” Dr. Medalie says. She adds that regular nightmares can be cause for concern, regardless of whether you’re taking melatonin or any other medication. “If nightmares occur outside of taking melatonin, they might be a symptom of either post-traumatic stress disorder, or even nightmare disorder. Those who have a history of trauma may experience flashbacks during sleep (i.e. nightmares), which can cause insomnia, sleep loss, and elevated distress.”

If this is the case, it’s important to address the underlying cause first. “If you are experiencing nightmares, the first thing to do would be to determine if they are related to any other existing general health or mental health issue,” Dr. Willeumier says. A healthcare provider can help get to the root of the problem, suggest a personalized treatment plan, or refer you to the right specialist.

“Non-pharmacological treatment options include cognitive behavioral therapy (CBT), which focuses on addressing the distorted thoughts, emotions, and behaviors with techniques that help correct the distortions in cognition,” Dr. Willeumier says. “There are variations of CBT, including image rehearsal therapy, lucid dreaming, sleep dynamic therapy, systemic desensitization, hypnosis, EMDR therapy, and relaxation and rescripting therapy.”

At the end of the day, you shouldn’t have to suffer. Good sleep is important, so don’t give up on finding a solution that works best for you.

– Additional reporting by Alexis Jones and Chandler Plante


Sydni Ellis is a PS contributor with her master’s degree in journalism from the University of North Texas. She loves talking about her passions, including writing, shopping, and reading murder mysteries.



Alexis Jones is the senior health and fitness editor at PS. Her passions and areas of expertise include women’s health and fitness, mental health, racial and ethnic disparities in healthcare, and chronic conditions. Prior to joining PS, she was the senior editor at Health magazine. Her other bylines can be found at Women’s Health, Prevention, Marie Claire, and more.



Chandler Plante is an assistant editor for PS Health and Fitness. She has over four years of professional journalism experience, previously working as an editorial assistant for People magazine and contributing to Ladygunn, Millie, and Bustle Digital Group. In her free time, she enjoys finding new ways to rock her 18(!) different eye patches, and making videos about chronic illness, beauty, and disability.