Many of us have a fraught relationship with sleep. We delay bedtime for precious alone time, we scroll on our phones in bed, we sacrifice weeknight sleep only to catch marathon Zs on the weekend.
Anyone who’s tossed and turned or stayed up too late then faced a cranky early morning knows that poor sleep can trigger a poor mood. But the relationship between sleep and our mental health goes deeper. Getting enough or not enough sleep can impact our mental health, and mental health conditions can influence how we snooze.
“It’s becoming increasingly clear that sleep and mood have a bidirectional relationship,” said Andrea Goldstein-Piekarski, PhD, assistant professor of psychiatry and behavioral sciences and director of the Computational Psychiatry, Neuroscience, and Sleep Laboratory at Stanford Medicine.
According to the Centers for Disease Control and Prevention, more than one in three U.S. adults and nearly eight out of 10 teens don’t get enough sleep, and around a quarter of adults have chronic sleep disorders like sleep apnea or insomnia. More than 1 in 5 U.S. adults has a mental health condition, according to the National Institute of Mental Health.
Extensive research has drawn links between mental health and sleep. People with insomnia, for example, are 10 times more likely to have depression and 17 times more likely to have anxiety than the general population. Sleep apnea raises the risks of these conditions about threefold. In short-term studies, sleep deprivation has been shown to reduce the ability to control our emotions. Conversely, psychiatric disorders like depression and anxiety can cause sleep problems.
It’s becoming increasingly clear that sleep and mood have a bidirectional relationship.
— Andrea Goldstein-Piekarski
Moody slumbers and ‘mind after midnight’
Goldstein-Piekarski studies the science behind the impact of sleep on mood. She’s using a brain imaging technique called functional MRI to assess how sleep changes biological function in the regions of the brain that process emotions. She and her team are using cognitive behavioral therapy, or CBT, for patients with insomnia. They’re helping patients improve their sleep habits (such as making the bedroom a relaxing place and addressing anxiety about the ability to get to sleep), then seeing how, for those whose sleep improves after the therapy, brain activity and moods change.
Goldstein-Piekarski also led a study on cognitive behavioral therapy for people who suffered poor sleep during the early stages of the COVID-19 pandemic, when stress levels were high. Although that study was conducted virtually during lockdowns and brain imaging wasn’t possible, the researchers found that the therapy led to improvements in sleep which, in turn, led to lower levels of depression.
Other studies have found that cognitive behavioral therapy and other interventions that ameliorate poor sleep also relieve symptoms of depression and anxiety, and that bigger improvements in sleep correlated to bigger improvements in mental health. Researchers are also studying how sleep interfaces with other mental health conditions such as post-traumatic stress disorder, psychosis and suicidal ideation. But there is limited data linking better sleep to improvements in these disorders.
Stanford Medicine-led research also tells us that when it comes to mental health, it’s not just sleep quantity but also timing that matters. Jamie Zeitzer, PhD, professor of psychiatry and behavioral sciences in sleep medicine, led a recent study of nearly 75,000 people in the U.K. showing that going to bed early and waking early is better for a person’s mental health, even if they’re a night owl.
This surprised Zeitzer and his colleagues, who thought it would be healthier to live in alignment with one’s “chronotype,” the sleep patterns a person naturally tends toward. In their study, participants who went to bed late had higher risks of depression, anxiety and other mental health disorders, no matter whether going to bed late aligned with their natural sleep preferences.
Zeitzer thinks this could be partly a result of what people are doing late at night, and how poor-decision hangovers could be bad for mental health.
“There is a theory called ‘mind after midnight,’ which is this idea that after midnight, your brain makes choices it wouldn’t make at noon,” he said. “Late at night, there are fewer social guardrails because everyone else is asleep, and you’ve been awake for 16 hours, so the cumulative experiences and stress of the day can change your decision-making processes.”
There is a theory called ‘mind after midnight,’ which is this idea that after midnight, your brain makes choices it wouldn’t make at noon.
— Jamie Zeitzer
Which came first, the depression or the insomnia?
Because sleep and mental health are so intertwined, teasing out cause and effect between the two can be tricky. In other fields, scientists often turn to animal studies where they can manipulate the animals’ biology or environments. But similar tactics for studying mental health can fall short, Zeitzer said. There aren’t great animal replicas of most human mental health conditions, and assessing mood in a lab rat is difficult. Instead, researchers often trace the sequence of events. Which came first, the sleep disruption or the depression? Even that might not always indicate that the first caused the second.
“One of the theories is that you have some underlying disruption of the brain where at a lower level of disruption, you get sleep problems. And at a higher level of disruption, you get disruption of emotion,” Zeitzer said. “You see the sleep one first, but it’s really the same process.”
To complicate the picture further, the issues can compound and amplify each other, resulting in a vicious cycle where mental health problems exacerbate sleep problems, which further exacerbate sleep disruptions. In the clinic, sleep specialists observe which symptoms seem to dominate a person’s experience.
“Does it look like the insomnia has taken on enough of a life of its own that it would be helpful to treat independently? Does it look like it’s sticking around even when other things are getting better?” asked Norah Simpson, PhD, a clinical professor of psychiatry and behavioral sciences. “Those would make me think it’s something we need to address.”
Not all sleepers were created equal
In the U.S., 16% of employed people are shift workers, meaning their work hours fall outside the typical 9-to-5. Of those, 6% work evenings and 4% work overnight. The rest work irregular shifts — think on-call doctors and nurses who swap between working days and overnight. Shift work is also associated with depression, anxiety and other psychiatric conditions.
Getting the best sleep possible is especially challenging for these people. So someone switching from an overnight shift to a day schedule, for example, might want to limit their light exposure after their shift, take a few-hour nap when they get home, then stay up until nighttime to return to a regular schedule as soon as possible.
“We’re still really leveraging those two underlying systems, the circadian rhythm and the sleep drive,” Simpson said.
And then there are teenagers. When puberty hits, there’s a natural shift in circadian rhythms; melatonin production in teens is delayed by about two hours compared with that of younger children and adults. But teens need just as much, if not more, sleep than adults do.
Some school districts have shifted start times later in recognition of this biological change. But many remain on an early morning schedule, and sports teams and other extracurriculars often have morning practices or meetings, requiring even earlier rising.
Mental health in teens has worsened since before the pandemic, and symptoms of depression among high schoolers jumped to even higher levels since 2020. Some of this may be a result of a rise in chronic sleep deprivation — up to 80% of teens aren’t getting the recommended amount of sleep. Unfortunately, the pressures of school and extracurricular activities keep sustainable solutions to the combined sleep and mental health crisis out of reach for many.
“The question becomes, if your kid is sleeping until 2 in the afternoon on the weekend, is that OK?” Zeitzer asked. “Frankly, they need that sleep. That is not an ideal sleep pattern. But not getting enough sleep overall is worse.”
Improving the sleep-mental health relationship
For people who want to take steps to improve their mental health through better sleep, Stanford Medicine researchers offer tips for achieving or maintaining good sleep hygiene:
- Avoid caffeine and other stimulants after early afternoon.
- Avoid alcohol before bedtime — it can reduce the quality of sleep and cause more frequent sleep interruptions.
- Keep the bedroom a comfortable and soothing environment.
- Try to go to bed and wake up at the same time every day, even on weekends. Maintaining a consistent sleep schedule is healthier than trying to weekend-warrior your sleep.
- Avoid screen time before bed. Apps are designed to keep you awake and can displace sleep.
- If you can’t sleep, don’t panic. You can't force sleep when it is not happening. It is better to let go of the struggle and pick up a book and read until you are sleepy.
If sleep issues are lasting weeks or months, it could be time to see a sleep specialist. The problem could be a chronic condition such as sleep apnea, circadian rhythm disorder, narcolepsy or chronic insomnia.
Cognitive behavior therapy is the gold-standard treatment for treating insomnia; it teaches patients behavioral changes to regulate the two biological systems involved in sleep: the circadian system and the sleep drive system.
The latter works much like natural hunger. People need to build up enough “sleep hunger” so they can get to sleep at night. That means avoiding long naps during the day. CBT practitioners also work with patients to address anxiety around sleep and insomnia.
“We work on decoupling the connection between the bed and arousing feelings. When someone has insomnia, they are so aroused and anxious, it prevents them from being able to fall asleep,” Goldstein-Piekarski said. “By decoupling those experiences, to re-pair sleep with the bed, you can more easily fall asleep.”