Migraine and sleep
Taking steps to improve your sleep routine may be positive for your migraine. We look at the links between migraine and sleep here.
How migraine and sleep are connected
Migraine and sleep are closely linked. It’s often described as a bidirectional link as it works in both directions.

Migraine may disrupt your sleep. People with migraine are more likely to have insomnia, or poorer sleep quality than people without migraine. Migraine attacks may start when you are asleep, causing your sleep to be disrupted. Many people with migraine find they frequently wake up with a migraine attack.
At the same time, sleep disruption is a common trigger for migraine attacks. This can mean not getting enough sleep, getting more sleep than normal or having a change in your sleep pattern. You may notice you are more likely to have a migraine attack if you have stayed up later or slept in longer than normal. Jet lag and shift work – where you don’t have a consistent sleep pattern – can also increase your risk of an attack.
Although sleep can have an impact on your migraine, it’s usually a combination of factors that trigger migraine attacks. In addition to not sleeping well, any disruption to your regular routine can have an impact. And many factors that contribute to migraine attacks – such as weather and hormones – are outside of our control.
What causes the link between migraine and sleep?
It’s not known exactly what causes these links between migraine and sleep. But it’s thought that some of the same structures, pathways and molecules in the brain involved in sleep also play a part in migraine attacks. How your brain is structured may make you prone to both migraine and sleep problems. Certain hormones and other substances in the brain, such as dopamine and serotonin, are important in both sleep and migraine.
Why does sleep help during a migraine attack?
Many people find that they can ‘sleep off’ a migraine attack, although this isn’t the case for everyone. Your brain is thought to get rid of waste products that build up over the course of a day during sleep. If these substances play a role in migraine, it may be that sleeping during a migraine attack allows your brain to reset itself. Resting in a quiet, dark room will also reduce any sensory triggers if these are an issue for you.
Your sleep-wake cycle and migraine
Migraine is closely linked to your sleep-wake cycle. This is controlled by something called your circadian rhythm – it’s a bit like an internal body clock.
Your circadian rhythm mainly responds to changes in light. When it gets dark, your eyes send a signal to your brain to release the hormone melatonin. This makes you sleepy. When it gets lighter, the brain reduces the amount of melatonin it makes. This starts to wake you up. This cycle affects the daily rhythm of biological processes in your body, such as your blood pressure. It also affects the timing of certain conditions, including your risk of migraine attacks.
Melatonin is known to play a role in regulating levels of certain substances in the body, such as calcitonin gene-related peptide (CGRP). It helps to control nerve activity and inflammation too. Both of these are factors known to be involved in migraine attacks.
Melatonin has been investigated as a treatment for migraine in several studies. However, evidence about how well it works is mixed. Melatonin is a prescription-only medicine, and it’s not currently licensed for migraine in the UK. A specialist may be able to prescribe it if you have migraine with insomnia. But this is rare. More research is needed to see whether it would be helpful as a migraine treatment.
Waking up with a migraine attack
If you wake up with a migraine attack, try to take your usual acute or ‘rescue’ medication as soon as possible. It may help to have something to eat and drink as soon as you can.
Acute medicines for migraine work best if you take them as soon as a headache starts. Be careful not to take painkillers or triptans too frequently (not regularly on more than two days a week). This can lead to medication overuse headache.
To reduce the chance of morning migraine attacks, try taking steps to improve your sleep routine. See our tips below for more information.
If you find you are regularly waking up with a migraine attack, speak to your GP. They can review whether you are taking the best treatment. They may be able to prescribe a faster-acting acute medicine, which can be helpful if you wake up with migraine attacks. They may also discuss whether you would benefit from a preventive medicine.
Your doctor may also want to check for other medical problems that may be causing your symptoms, such as sleep apnoea, high blood pressure or hypnic headache. Hypnic headache is a rare type of headache disorder that only occurs during sleep, causing you to wake up.
Tips for a good sleep routine
There is still a lot to understand about the link between migraine and sleep. But developing a regular sleep pattern is known to be important for migraine. The following tips can help.
- Take time to understand your sleep needs, including when feels right for you to go to bed and how much sleep you need. Most adults need about 7 to 9 hours a night. Children will need longer, depending on age.
- Try to get into the habit of going to bed and getting up at the same time each day. If you work or are in education, this means getting up at a similar time at the weekend or on days off.
- Try and make your sleeping environment as comfortable and restful as possible. For most people, this means making sure it is dark, quiet and cool. Use good quality curtains or blinds to block out light and make sure the room is well ventilated. You can also try using eye masks and earplugs if you need to. You may prefer low lights to darkness and background noise rather than silence. It’s a personal choice, so try different variations to find what works for you.
- Try and spend some time outdoors or in natural light during the daytime – especially early in the morning if you can. This can help regulate your internal body clock and may help to improve sleep quality and duration.
- Regular exercise can help with sleep. But try not to exercise too close to bedtime, as it may stop you from sleeping. Exercising outside during the day can mean you will also benefit from exposure to daylight.
- Avoid caffeine, alcohol and nicotine in the hour or two before bedtime. These are stimulants that make you feel more awake and can reduce the overall quality of your sleep.
- If something is worrying you or on your mind, take some time to write it down or create a ‘to do list’ to deal with the following day. This may help you to clear your mind before bed.
- Get into a routine or relaxing and unwinding before you go to bed. You might want to read or listen to music or podcast. You could try relaxation techniques too, such as guided meditation or breathing exercises. Try to avoid devices such as mobile phones, tablets and computers at least an hour before bed. These devices give out artificial light, which may affect your sleep cycle.
- If you feel unable to go to sleep at the time you have planned, don’t try to force it. If you are unable to sleep, get up and do something relaxing instead, such as reading a book or listening to music or a podcast. Only go back to bed to try again when you feel tired.
- Some people find monitoring their sleep with a diary or app helpful to get into a regular pattern. It’s important not to become too fixated on this though, as this can make you feel more anxious – which may have a negative effect on your sleep.
About our information
This information has been written by The Migraine Trust Information and Support Services team. It has been reviewed by our panel of expert health professionals and people affected by migraine.
Our information has been awarded the PIF TICK quality mark for trustworthy health information.
If you have feedback on our information, please get in touch at: feedback@migrainetrust.org
Last reviewed: January 2026 | Next review due: January 2029
- Vgontzas A, Pavlović JM. Sleep disorders and migraine: review of literature and potential pathophysiology mechanisms. Headache: The Journal of Head and Face Pain. 2018;58(7):1030-1039. doi:10.1111/head.13358
- Stanyer EC, Creeney H, Nesbitt AD, et al. Subjective sleep quality and sleep architecture in patients with migraine. Neurology. 2021;97(16). doi:10.1212/WNL.0000000000012701
- Benkli B, Kim SY, Koike N, et al. Circadian features of cluster headache and migraine: a systematic review, meta-analysis, and genetic analysis. Neurology. 2023;100(22):e2224-e2236. doi:10.1212/WNL.0000000000207240
- Poulsen AH, Younis S, Thuraiaiyah J, et al. The chronobiology of migraine: a systematic review. J Headache Pain. 2021;22(1):76. doi:10.1186/s10194-021-01276-w
- Sebastianelli G, Atalar AÇ, Cetta I, et al. Insights from triggers and prodromal symptoms on how migraine attacks start: The threshold hypothesis. Cephalalgia. 2024;44(10). doi:10.1177/03331024241287224
- StatPearls Publishing. Physiology, circadian rhythm. 1 May 2023. ncbi.nlm.nih.gov/books/NBK519507/, accessed 5 December 2025
- Araujo Gouhie F, Alves Silva D, et al. Melatonin compared to other Treatments for episodic migraine: a systematic review and network meta-analysis. Canadian Journal of Neurological Sciences / Journal Canadien des Sciences Neurologiques. Published online 27 October 2025. doi:10.1017/cjn.2025.10423
- Wu J, Wu J, Zhang J, et al. Oral preventive medications for migraine in adults aged 18–65: a network meta-analysis. Front Pharmacol. 2025;16. doi:10.3389/fphar.2025.1620887
- NICE British National Formulary (BNF). November 2025. bnf.nice.org.uk, accessed 16 December 2025
- International Headache Society global practice recommendations for the acute pharmacological treatment of migraine. Cephalalgia. 2024;44(8). doi:10.1177/03331024241252666
- NICE Clinical Knowledge Summaries. Migraine. August 2025. cks.nice.org.uk, accessed 16 December 2025
- International Headache Society. IHS classification ICHD-3. 4.9 Hypnic headache. ichd-3.org, accessed 16 December 2025
- Tips to improve your sleep. December 2024. mind.org.uk, accessed 16 December 2025
- NHS Better Health. How to fall asleep faster and sleep better. nhs.uk, accessed 16 December 2025.
- Blume C, Garbazza C, Spitschan M. Effects of light on human circadian rhythms, sleep and mood. Somnologie. 2019;23(3):147-156. doi:10.1007/s11818-019-00215-x
- de Menezes-Júnior LAA, Sabião T da S, Carraro JCC, et al. The role of sunlight in sleep regulation: analysis of morning, evening and late exposure. BMC Public Health. 2025;25(1):3362. doi:10.1186/s12889-025-24618-8
