Some links may earn us a commission; our work is independent.

Migraine and Sleep: How Each Can Affect the Other

Learn how migraine and sleep interact, how to tell a possible sleep pattern from an early attack symptom, and when headaches need medical care.

Woman with headache

The short version

  • Sleep and migraine can affect each other, but a change in sleep before an attack does not prove that sleep caused it.
  • A combined sleep and headache diary can reveal personal patterns and symptoms that may point to insomnia, sleep apnea, restless legs syndrome, or medication effects.
  • Seek urgent care for a sudden severe headache, new neurological symptoms, fever with a stiff neck, a headache after significant head injury, or a new or severe headache during pregnancy or after birth.

Sleep and migraine have a two-way relationship. Pain, nausea, sensory sensitivity, and recovery from an attack can disturb or extend sleep. In the other direction, some people notice attacks after a short night, a long sleep, or a schedule change. Research supports a close association, especially between migraine and insomnia, but it does not show that one sleep pattern causes every attack 1.

There is another complication: sleepiness, repeated yawning, difficulty sleeping, and food cravings can be early features of the migraine attack itself. What looks like a trigger may sometimes be the prodrome, the phase that begins before head pain 23.

The useful question is therefore not simply, "Did I sleep badly?" It is, "Does a repeated pattern remain after I account for early migraine symptoms, medicines, menstruation, and a possible sleep disorder?"

What migraine can look like

Migraine is a neurological disorder that causes recurring attacks. Many attacks include headache with some combination of nausea, vomiting, sensitivity to light and sound, and pain that is worsened by ordinary activity. The formal criteria for migraine without aura require a combination of features. They do not require every headache to be one-sided or throbbing 4.

Migraine with aura involves temporary, fully reversible neurological symptoms. Visual changes, pins and needles, numbness, or speech and language symptoms usually develop gradually. Aura may occur before or during head pain, and it can occur without a headache 5.

A migraine attack may involve four phases, but not everyone has all four and the sequence can vary:

  • Prodrome: Hours or sometimes days before head pain, a person may notice fatigue, sleepiness, difficulty sleeping, repeated yawning, neck discomfort, mood or concentration changes, nausea, or food cravings. These symptoms can be mistaken for triggers. Craving chocolate before pain, for example, does not by itself show that chocolate caused the attack 23.
  • Aura: Some people develop reversible visual, sensory, speech, language, or other focal neurological symptoms. Typical aura develops gradually and most individual symptoms last 5 to 60 minutes. A new, sudden, unusually prolonged, or otherwise atypical neurological symptom needs medical assessment rather than an assumption that it is migraine 5.
  • Headache phase: Head pain may occur with nausea, vomiting, light or sound sensitivity, and reduced tolerance for activity. Pain can disrupt sleep, while an attack that begins during sleep may wake the person.
  • Postdrome: Fatigue, trouble concentrating, and mood changes may continue after the headache resolves. Extra sleep during this period can be part of recovery rather than evidence that long sleep triggered the attack 5.

How sleep patterns fit into migraine

Short sleep, long sleep, and schedule changes

People with migraine often report insufficient sleep, sleeping longer than usual, or an irregular schedule around attacks. These reports are useful clues, not universal rules. A short night could increase vulnerability for one person, while for another it could reflect prodromal insomnia. Sleeping late could precede an attack, follow a painful night, or be part of postdrome recovery 1.

Do not force a rigid bedtime or a fixed amount of sleep solely to prevent migraine. Look for a repeatable pattern in your own record, then discuss a realistic change if the pattern is affecting you.

Insomnia

Insomnia and migraine often occur together, and the association appears to work in both directions. The available studies cannot fully separate cause from shared biology, medicines, mood symptoms, pain, and other health conditions 1.

Persistent difficulty falling asleep, staying asleep, or returning to sleep deserves its own assessment. Treating insomnia can improve sleep and daytime function. Small studies of psychological sleep interventions in people with migraine suggest possible headache benefits, but the evidence is limited and does not guarantee fewer migraine attacks 6.

Sleep apnea and morning headache

A headache on waking is not specific to obstructive sleep apnea. It can occur with migraine, other headache disorders, other sleep disorders, and respiratory conditions. A 2024 systematic review found that people with OSA commonly reported headaches, but OSA did not significantly increase headache risk compared with people without OSA in the pooled analysis 7.

The International Classification of Headache Disorders separately recognizes sleep apnea headache. That diagnosis requires established sleep apnea and evidence that the headache changes with the apnea. It is typically a waking headache with a different pattern from classic migraine. Morning headache alone cannot establish it 8.

Loud snoring, witnessed breathing pauses, gasping, or persistent daytime sleepiness are reasons to discuss sleep apnea testing 1. Treat diagnosed OSA according to its care plan. Successful treatment can resolve a true sleep apnea headache, but it does not guarantee that a separate migraine disorder will disappear 8.

Restless legs syndrome

Restless legs syndrome causes an urge to move the legs that is worse at rest and usually worse in the evening or at night 1. A 2026 meta-analysis found that RLS was common among people with migraine, especially in groups with chronic migraine or greater disability. The studies were observational, so they do not show that RLS causes or triggers migraine 9.

If leg symptoms repeatedly delay or fragment sleep, describe them to a clinician rather than assuming the resulting tiredness is simply part of migraine. RLS and migraine each need an appropriate diagnosis and treatment plan.

Attack timing and the body clock

Some people have attacks that cluster around waking, sleep, work shifts, weekends, or menstruation. Studies of migraine timing have found different daily and seasonal patterns, and many people do not have one consistent attack time. Differences in study methods and populations make a universal "migraine hour" unlikely 10.

Timing can still matter personally. Record when symptoms actually begin, including prodrome and aura, rather than only when the pain becomes severe.

Naps

A nap is not automatically a migraine cause or treatment. In a six-week study of 97 adults with episodic migraine, naps were more likely during a prolonged headache and generally started after the headache began. Napping was not associated with additional headache days or worse sleep that night, but the study could not establish whether naps relieved pain 11.

If you nap during attacks, record when the headache and nap started and how you felt afterward. That is more informative than applying a blanket rule to avoid or prescribe naps.

Build a diary that separates cause, symptom, and consequence

A combined headache and sleep diary is often the clearest way to find a personal pattern. NICE recommends recording headache frequency, duration, severity, associated symptoms, possible precipitants, medicines, and menstruation when a diary is used to help diagnosis 12.

Keep the record simple enough to use consistently. Useful entries include:

  • sleep opportunity, approximate sleep and wake times, long awakenings, and naps * when prodrome, aura, head pain, and postdrome symptoms began and ended * menstrual timing, when relevant * prescribed and over-the-counter medicines, when they were taken, and what happened next * caffeine and alcohol when they differ from your usual pattern * daytime sleepiness, concentration, driving, work, or school impairment * snoring, gasping, an urge to move the legs, or another recurring sleep symptom

Review patterns across several attacks. A single association can be coincidence. Repeated food craving or yawning just before pain may be prodrome, while repeated insomnia many hours before other symptoms may warrant a separate sleep assessment. If you test a practical change, change one manageable factor at a time so the result can be interpreted.

Treat migraine and sleep problems as linked but separate

A useful care plan has two parts: an appropriate migraine plan and treatment for any independent sleep disorder.

  • Migraine treatment: Use acute medicine at the phase and timing recommended in your prescribed plan. If attacks are frequent or disabling, ask whether prevention is appropriate. Treatment choice should account for other conditions and side effects, including whether a medicine makes you sleepy or affects sleep. Do not change the dose or timing on your own 12.
  • Medicine use: Record every acute migraine and pain medicine. NICE advises clinicians to consider medication-overuse headache when triptans, opioids, ergots, or combination painkillers are used on at least 10 days per month, or simple painkillers on at least 15 days per month, for 3 months or longer. If this may apply, contact the prescriber rather than attempting an unsupported withdrawal plan 12.
  • Insomnia treatment: Chronic insomnia needs a cause-led plan. Cognitive behavioral therapy for insomnia may be part of that plan. Better sleep is valuable even when the effect on migraine remains uncertain 6.
  • Other sleep disorders: OSA, RLS, and circadian rhythm disorders require condition-specific evaluation and treatment. Treating one may improve sleep and daytime function, but it should not be presented as a guaranteed migraine cure 1.

This article does not recommend adding a sleep medication or supplement to prevent migraine. A clinician or pharmacist can review whether a product fits the diagnosed problem, current medicines, and personal risks.

When a headache needs urgent care

Seek emergency care for:

  • a sudden headache that reaches maximum intensity within minutes * new weakness, numbness, trouble speaking, confusion, fainting, seizure, or significant vision loss, especially when the symptoms are sudden or unlike a diagnosed aura
  • headache with fever and a stiff neck, or with a reduced level of consciousness * a severe or worsening headache after a significant head injury

These features can point to a secondary cause that must be assessed rather than assumed to be migraine 1213.

Pregnancy and the postpartum period are also higher-risk settings for secondary headache. Contact obstetric or urgent medical care promptly for a new, severe, or rapidly changing headache during pregnancy or after birth, particularly with visual or neurological symptoms 1413.

Arrange timely medical review for a substantial change in a familiar headache pattern, a progressively worsening headache, a new headache with cancer or immune suppression, or repeated vomiting without another explanation. A new or atypical aura also deserves assessment. Familiar migraine and a new secondary headache can occur at the same time 1213.

Migraine and sleep are connected, but the connection is personal and often more complicated than a list of triggers. Tracking the sequence of sleep, early symptoms, pain, medicines, and recovery gives you and your clinician a better basis for deciding what needs to change.

Sources

Evidence cited in this article.

14 sources
  1. Migraine and sleep disorders: a systematic review (opens in a new tab)
    The Journal of Headache and PainResearch
  2. 1. Migraine (opens in a new tab)
    International Headache SocietyProfessional guidance
  3. Migraine Prodrome: Symptoms and Prevention (opens in a new tab)
    American Migraine FoundationProfessional guidance
  4. 1.1 Migraine without aura (opens in a new tab)
    International Headache SocietyProfessional guidance
  5. 1.2 Migraine with aura (opens in a new tab)
    International Headache SocietyProfessional guidance
  6. Psychological Sleep Interventions for Migraine and Tension-Type Headache: A Systematic Review and Meta-Analysis (opens in a new tab)
    Scientific ReportsResearch
  7. Prevalence of headaches and their relationship with obstructive sleep apnea (OSA) - Systematic review and meta-analysis (opens in a new tab)
    Sleep Medicine ReviewsResearch
  8. 10.1.4 Sleep apnoea headache (opens in a new tab)
    International Headache SocietyProfessional guidance
  9. Migraine and Restless Legs Syndrome: A Meta-Analysis (opens in a new tab)
    Journal of Sleep ResearchResearch
  10. The chronobiology of migraine: a systematic review (opens in a new tab)
    The Journal of Headache and PainResearch
  11. Napping behavior in adults with episodic migraine: a six-week prospective cohort study (opens in a new tab)
    SleepResearch
  12. Headaches in over 12s: diagnosis and management (opens in a new tab)
    National Institute for Health and Care ExcellenceGovernment source
  13. Red and orange flags for secondary headaches in clinical practice: SNNOOP10 list (opens in a new tab)
    NeurologyResearch
  14. Headaches in Pregnancy and Postpartum (opens in a new tab)
    American College of Obstetricians and GynecologistsProfessional guidance

Keep reading

More on Pain and Sleep

Open Pain and Sleep →