If you suffer from the occasional migraine headache, you might as well ask yourself:
Are you getting enough sleep?
Apparently, sleep – or lack thereof or having too much of it – is a common trigger for a headache.
The medical journal Headache indicates a study showing that more than four out of five people suffering from a migraine reported sleep problems and feeling tired upon waking up. 
The Headache report states:
“Dysregulation of sleep (e.g, sleep deprivation, oversleeping, disturbed or interrupted sleep) is now recognized as one of the more commonly reported acute headache triggers among patients with Migraine and tension type headache.”
Another study also showed significant improvements in migraine, having suffered less of it at weaker intensity, after getting behavioral sleep guidance. 
How are sleep and headache connected?
Your body tries to equalize things.
Your body has a way of balancing things out. This is called homeostasis, or the state of equilibrium.
In the realm of sleep, your body makes sure that it gets enough rest. So if you don’t get enough shut-eye, it’ll trigger you to stop and go back to bed. If you happen to oversleep on weekends, it’ll also tell you by keeping you awake. Both of these balancing acts may happen through headaches, in either end of the spectrum.
For instance, if you lack sleep, a migraine will force you to stop whatever you’re doing and rest. If you sleep in on weekends and have too much beauty sleep, then you’ll notice a little throbbing in your head too – keeping you awake. This is just nature’s way of keeping the balance and aligning your circadian rhythm.
Sleep and headaches are both controlled by the same parts of the brain
Another reason for the link between sleep and headache is the way your brain is structured. Both functions are controlled by the same regions of your brain. They also share chemical brain messengers.
So when you don’t get enough sleep, your brain tries to strike a homeostasis and it increases the likelihood for a headache. Poor quality sleep also lowers your tolerance for pain so you tend to feel the throbbing in your head more.
When you get back on track with your snooze, your body will thank you and keep the headache at bay.
According to Help for Headaches, a Canadian research organization: 
“Migraine headaches occur in direct relationship to the number of REM sleep periods that one has during the night. Migraine headaches usually occur either during or after REM sleep or in delta sleep which is the deep sleep that we all require in order to feel alert and refreshed the following day. It remains unclear whether the changes in the neurotransmitter or chemical systems in the brain, hormonal influences, or a combination of several different phenomenon [sic] are the cause.”
Headache "triggers" that are related to sleep
Now that we’ve established the connection between sleep and headache, the next thing to note are the triggers.
What are we doing/NOT doing with snooze that causes migraine?
Here are some sleep-related triggers to common headaches: 
- Sleep loss/lack of sleep
- Staying up late
- Fragmented sleep
- Oversleeping (when you sleep in on weekends)
- Quick shifts in sleep schedule
- Jet lag
- Restless legs syndrome 
- Excessive daytime sleepiness
- Abnormal sleep behavior of jaw clenching
- Circadian rhythm or “body clock” disorders
Here’s the rule of thumb: The optimal sleep span for adults is seven to eight hours per night.  Anything below or over this may be the start of a long and painful journey to headache-town.
According to research, either extreme such as short (less than six hours) and long sleep periods (greater than eight and a half hours) are associated with increased headache severity. 
Headaches you get from lack of sleep and oversleeping
There are different kinds of headache that you can get from either not sleeping enough or sleeping in:
Sleep apnea /night-time headache
A 2015 study linked obstructive sleep apnea to a higher risk of developing tension type headache.  Symptoms of sleep apnea include the following:
- breathing stops and starts throughout the night
- Waking up in the wee hours
- Peeing in the middle of the night
- Night sweats
- Daytime sleepiness
Sleep apnea is linked to hypertension, heart disease, and stroke. It can also cause night time headaches, which messes up your sleep.
Jelena M. Pavlovic, MD, PhD, attending neurologist at Montefiore Headache Center in New York City who’s also an expert in sleep and headache, states in an interview that: 
“headache disorders and sleep apnea are quite common in the general population and [we] wonder if people with underlying headache disorders are more sensitive to the headache-inducing effects of sleep apnea (several studies have shown that hypoxemia — such as that occurring with sleep apnea — can induce a headache).10 It is interesting to think of sleep apnea as a potential inciting factor for primary headache disorders. However, the most important clinical aspect is to identify those at risk for sleep apnea and to refer to a sleep specialist who can diagnose and begin appropriate treatments.’
About half of all migraines show up between 4 and 9 a.m. These are called awakening headaches, which are characterized by a pattern of waking often or daily with a headache. They may be in a form of migraine, tension type, or other types of headaches.
Chronic daily or awakening headache patterns may be signs of sleep disorders.
As the most common headache among people with sleep problems, insomnia is characterized by the following symptoms:
- difficulty falling or staying asleep
- early morning awakenings
- non-refreshing sleep.
Because this type of sleep is usually less than six hours at night, insomnia leads to disruption in daytime functions, fatigue, poor attention, lack in concentration and motivation. It also alters your mood, like making you feel anxious over being anxious.
Cluster headache is perhaps one of the most common headache disorders that’s related to sleep. It can be described as throbbing with a rhythmic pattern.
Those who suffer from cluster headache tend to get it during certain periods, like at a certain cycle at a particular time during the night.
When you suffer from cluster headache, you’ll wake up while sleeping and it often happens at similar times. This links it back to biological disruptions and your “body clock”/circadian rhythm.
While it doesn’t usually happen, hypnic headaches are unique to sleep. When it happens, sufferers (often older women) often wake up in the middle of the night with a dull, featureless pain that lasts for several hours. It also happens frequently and a number of times in a week.
According to Migrainetrust.org, “the integrity of sleep stages alters with age, with older populations having less slow wave sleep than younger people, so it may be reasonable to assume that hypnic headache might result from a reduction in slow wave sleep in susceptible individuals. Interestingly the stimulant caffeine is reported to be an effective treatment in some cases.” 
Dealing with Headache and Sleep
Headaches can be completely debilitating both during the day and at night. If you suffer from headaches that are disrupting your sleep, your daytime functions, or your overall quality of life, please consult a qualified medical professional for help. If you have infrequent headaches that don't disrupt your sleep, then consider trying a sleep supplement to help you improve your overall sleep quality.