Anyone who has dealt with migraines knows they’re not mere headaches. These miserable, often debilitating attacks of pain, fatigue and nausea can strike at any time—and nothing makes you want to crawl back into bed more than waking up with one.

Neurologists have struggled to pin down the exact causes of migraines, but some research has suggested a lack of sleep could be involved in a big way. And now a recent global study published in the Journal of Headache and Pain has found that a poor night’s sleep can increase the chance of a migraine the following day.

Sleep and migraines have “a complicated relationship, so we wanted to do this in a really large sample to see if we can know more about it,” says Emily Stanyer, a postdoctoral researcher at the University of Oxford and lead author of the study. “There’s a lot of anecdotal evidence reporting that people with migraines have disrupted sleep.”

Prior research has found that sleep interruptions, such as incoming text messages or the need to urinate frequently at night, are a trigger for migraine attacks. In one foundational study in 2007, 50 percent of people with a history of migraines reported they were more likely to experience one after having trouble sleeping, and 32 percent said sleeping late was a migraine trigger. Such irregularities can disrupt the restorative effects of sleep and possibly convert acute migraine attacks into chronic episodes.

One reason the connection between sleep and migraines has been so difficult to understand is that the attacks are usually studied after they occur. Many papers have included reports of people who had recalled a past experience or estimated how many hours they slept or woke up through the night before the migraine set in. Self-reported data can sometimes be unreliable because people may misremember, potentially exaggerating or downplaying their experience. The latest study used a new and more reliable way of collecting self-reported data.

“A better understanding of the relationship between migraine and sleep is likely to enhance our ability to treat both migraine and sleep disorders,” says Andrew Charles, a professor of neurology who studies migraine at the University of California, Los Angeles, and was not involved with the new study.

Wake Tonight, Hurt Tomorrow

The new study differs from past research by having thousands of people between age 18 and 81 use a smartphone app to record their real-time sleeping habits, including the start and end times of sleep in a single night and estimated hours of sleep per night. Participants used the app to estimate how often they picked up their phone during the night; if they did not, they were assumed to be sleeping. The resulting large quantity of real-world data provided a rare snapshot of how migraine and sleep are interlaced, Stanyer says.

Of the 11,166 users who took part in the worldwide study, the researchers focused on 724 people based in 38 countries who had at least eight migraine attacks per month—the clinical definition of chronic migraines. When these participants reported migraine symptoms, they had also commonly experienced frequent sleep interruptions the night before. For every disruption, the authors calculated a 17.4 percent increased risk of having a migraine.

“It doesn’t matter how many hours you sleep,” Stanyer says. “It’s the quality of that sleep.”

A change in one’s sleep schedule—whether fewer or more hours than usual—also affected the chances of a migraine the next day. For every disrupted night of sleep, there was also a 6.1 percent increased risk of having a migraine attack. According to the authors, such deviation from a normal sleep schedule could explain why people with jet lag or those who do shift work are prone to migraines. The team could not investigate whether having sleep disorders, psychiatric conditions or certain sleep chronotypes (such as those of people described as “night owls” and “morning larks”) influenced migraines. This constraint was because of the limited medical information that a smartphone app could collect, Stanyer says. She hopes future studies can involve data collection on sleep disorders and chronotypes because she suspects there is a connection. For example, the authors of the new paper refer to a 2021 study in a Chinese population that found that people with insomnia have significantly higher risk of migraine.

Sleeping to Heal

The new research clears up some aspects of how sleep affects migraine attacks, but questions remain. Sleep and migraine have a bidirectional relationship, says Mia Minen, an associate professor and director of headache services at the NYU Grossman School of Medicine, who was not involved in the current study. “The pain itself can awaken patients at night and interrupt sleep,” she explains. “In addition, there can be anxiety and fear of an attack, which can also lead to sleep disturbances.”

The study authors did find evidence that intense migraine pain altered sleep. Instead of decreasing sleep, as they initially hypothesized, however, the pain was linked to a sleep increase. The researchers suggest that the extra hours of sleep after a painful migraine may help fix disruptions in the brain’s energy metabolism. While asleep, the brain flushes out waste products, and some research suggests chronic headaches may arise because metabolic imbalances interfere with this process.

Brain Activity Behind the Sleep-Migraine Relationship

A bidirectional relationship hints at multiple mechanisms that could drive the connection. Beyond the metabolic imbalance theory, another idea involves a brain area called the hypothalamus. This region, which is involved in regulating several bodily processes, contains the suprachiasmatic nucleus—a small brain region that Charles says acts as “the ultimate [circadian] clock for sleep and wakefulness.” When this internal clock is disrupted, it throws off the rhythm of behavioral, physical and mental changes in a 24-hour cycle. Although the new research didn’t directly study the suprachiasmatic nucleus, Stanyer suspects that a deficit in its ability to regulate the circadian rhythm might be behind some migraine attacks. This could partially explain why many people tend to experience migraines at certain points of the day.

Scientists have also proposed that a brain chemical called adenosine can influence migraine. Adenosine is a by-product of energy metabolism, but it also acts as an inhibitory neurotransmitter—a chemical messenger that affects brain cells and dilates blood vessels. As adenosine accumulates throughout the day, it slows down excitatory networks such as the arousal-causing reticular activating system. This, in turn, causes sleepiness. One speculation is that there is an abnormally high concentration of adenosine in the brain during a migraine. Charles says this may explain why people have fatigue or an increased drive to sleep during a migraine attack. It may also be why caffeine—a stimulant that blocks adenosine’s effects—can be helpful during a migraine, adds Charles, who recently studied the effects of caffeine on sleep in mice.

Charles likens the relationship between sleep and migraine attacks to a never-ending feedback loop. On one hand, migraines disrupt sleep and increase the likelihood of another attack. And yet, as some of the recent research has shown, sleeping too much can also lead to more migraines. Breaking this cycle is key to future migraine treatments, Charles says—and an undisturbed sleep schedule could be a good place to start.