**1. Introduction**

Headache disordes lead to significant disability worldwide, impairing quality of life, damaging productivity, and substantial burdens of financial cost on both the individual and societies. For this reason, these disorders effectuate a major public health problem in all countries and world regions. In Global Burden Disease (GBD) study 2019, headache disorders have been estimated to account for 46.6 million years lived with disability [YLDs] globally, which has been 5.4% of all YLDs, with 88.2% of them attributed to migraine [1]. The frequency of headache has been substantially increased over the last 30 years due to changes in lifestyle. Controlling the trigger factors and lifestyle changes (e.g. regular sleep, meal time, exercise, etc.) are the first step management strategies in headaches [2]

Sleep disorders and headache have bidirectional effects on each other [3, 4]. The nature of this relationship and whether sleep disturbance or headache has more impact on one another is still poorly understood [5–7]. Headache may be intrinsically related to sleep such as hypnic headache or cluster headache (CH) [8, 9]. Poor quality, and excessive or diminished sleep can be a trigger factor for headache (e.g. migraine and tension-type headache (TTH)), or contrary sleep may have a a relieving effect on a migraine attack [10, 11].

Headache chronicity might be also associated with the duration and quality of sleep [12]. The severity of a sleep disorder may be in an adverse correlation with the intension of the pain [3]. Patients with headache may have poor sleep quality, reduced total sleep time, more awakenings, and alterations in architecture of sleep recorded by polysomnography (PSG) [13]. Prevalance of chronic headache was found to be higher in patients who underwent polysomnographic investigation due to sleep problems [14].

In this section, we aim to discuss the effects and relation of sleep and primary headaches on one another.

## **2. Common pathophysiology between headache and sleep disorders**

Sleep is a recurrent, reversible, periodic, and cyclic active and physiological process that is essential for life [15]. Sleep has essential roles for health such as regulating immune system, releasing hormones (e.g. growth hormone), neurodevelopment, mental health, memory, etc. [16]. Several factors effect the total duration of sleep, time to fall asleep, time to wake-up, and total duration of wakefullness. Sleep and wake cycle is regulated by circadian and homeostatic rhythms. Light is a main factor for circadian rhythmicity, in addition to, time for meals, work or school schedules, social activites, or internal biological clock designate sleep and wake durations [17].

Sleep is composed of four to six recurrent sleep periods each lasting to 80–110 minutes [16]. These periods are constituted of two main sleep stages as rapid eye movement (REM) and non-rapid eye movement (NonREM). NonREM sleep is divided into three stages such as N1, N2, and N3 (slow-wave sleep) [18]. During the early hours of night, NonREM stages dominate the sleep while REM stage dominates the later part of the sleep [16].

Even though pathophysiology of headache and sleep disorders shares the same brain structures and pathways, sleep disturbances are commonly underestimated and underdiagnosed in headache patients [19].

Thalamus is one of the main centers for regulation of sleep and also pain by receiving ascending nociceptive stimulus from trigeminocervical system. Dysregulation in thalamocortical circuits may be predisposing to sleep and headache disorders [20, 21]. Sleep deprivation may induce hyperexcitability and may alter regulation of cortical circuits [22]. During the shift from wakefullnes to sleep, there is an increment in response to tactile, auditory, and propriseptive stimulus. Disturbed sleep seems to escalate pain by decreasing the activity of descending inhibitory pain control system leading to diminish pain treshold [23, 24].

Hypothalamus, containing suprachiasmatic nuclei (SCN) being the main brain structure to maintain sleep-wake cycle, seems to be responsible for the prodromal symptoms of migraine like mood, appetite or sleep changes, fatigue, or yawning [25, 26]. Accompanying autonomic symptoms like nausea, lacrimation, and rinorrhea suspect the role of hypothalamus also during a migraine attack [27].

*Sleep Patterns Changes Depending on Headache Subtype and Covariates of Primary Headache… DOI: http://dx.doi.org/10.5772/intechopen.106497*

A reduction in arousal index in REM sleep stage and a reduction in cyclic alternating pattern (CAP) in NonREM sleep stages of migraneous patients may show a dysfunction in the connection of brainstem and hypothalamus both of which are important in the pathophysiology of sleep disorders and migraine [28, 29].

In cluster headache [CH], hypothalamus has a crucial role both in autonomic sypmtoms and periodicity of the headache. During attacks, ipsilateral to the autonomic features hyperactivation in hypothalamus was shown by a positron emission tomography (PET) study [30]. In another study, volume of anterior hypothalamus was found to be increased suggesting a structured alteration in SCN [31].

Neuropeptides orexin A and B that are important for the maintenance of wakefullness are synthesized mainly in lateral and posterior hypothalamus. Orexinergic receptors are located in prefrontal cortex, thalamus, and subcortical areas and also take role in pain modulation, thermoregulation, and autonomic functions except maintaining wakefullness and wake-sleep rhytmicity [25]. Sarchielli et al have found lower levels of orexin in patients with episodic migraine and higher levels in patients with chronic migraine and medication overuse headache suggesting a dysfunction of orexin and a response of hypothalamus to headache [32]. There is an orexin deficiency in narcolepsy, and high prevalance of migraine in patients with narcolepsy may indicate a dysfunction of orexin in migraine pathophysiology as well [33, 34].

Melatonin also called as sleep hormone is synthesized in epiphysis (pineal gland), and the secretion is regulated by suprachiasmatic nuclei. Thus, having a role in circadian rhythm, melatonin also has an analgesic effect via anti-inflammation, inhibition of dopamine release, and GABAergic and antiglutamatergic effects [35]. Melatonin therapy seemed to be affective in headache treatment even with or without an accompanying sleep-wake disorder [36].

Locus cereleus (LC), periaquaductal gray matter (PAG), and dorsal raphe nucleus (DPN) are important brain structures for both headache and pain [34]. Ventrolateral part of PAG that is activated by lateral orexinergic neurons of hypothalamus is a section of REM off area, and it is active during wakefullness while silent at REM sleep stage [37]. LC takes role in stabilizing the switches from sleep to wake, and DPN mainly takes role in switches from NonREM to REM sleep [38, 39]. The decrease in cyclic alternating pattern in REM sleep of migraineous patients is suspected to be a dysfunction of serotonergic system [40]. Dopaminergic dysfunction is associated with prodromal symptoms of migraine, e.g. yawning and mood changes and also with enhanced risk of restless legs syndrome (RLS). The prodromal symptoms being more in patients with RLS may indicate the role of affected dopaminergic system in both of the diseases [41].

Another suspected mechanism is the role of glymphatic system which is a clearing system of interstitial waste products from central nervous system [42]. In an experimental model, it has been shown that glymphatic system was temporarily disturbed during cortical spreading depression and improved 30 minutes later, indicating the role of glymphatic system in migraine pathophysiology [43]. As during sleep glymphatic system is active, the ameliorating effect of sleep on migraine attacks may be explained by the glymphatic system [4].

## **3. Sleep disorders and headache**

During the evaluation of sleep macrostructure by polysomnography, sleep latency, REM sleep latency, percentages of every sleep stages, total sleep time, and sleep efficiency are mainly analyzed. Polysomnography is a diagnostic test for the detection of both the existence and the type of the sleep disorder. Channels of electroencephalography, electrooculography, and electromyography are used to evaluate all of the sleep stages and wakefullnes. Thermistor, nasal canule, and sensors located on thorax and abdomen belts are used to detect the existence and type of abnormal sleep-related breathing disorders. At the same time, electromyographic channels are used to observe sleep-related movement disorders [44].

The time that the first sleep stage epoch seen is called as sleep latency (minute), and the time that first REM sleep stage seen is named as REM latency (minute) [45]. Sleep effciency (%) is the ratio of total sleep time (TST) to total recording time during polysomnography all night [46]. Microstructure of sleep is evaluated by the detection of arousals and the analysis of cyclic alternating pattern [CAP]. Either macrostructure or microstructure of sleep can be effected by primary headaches, and changes can be observed by polysomnography [47].

Sleep disorders are classified as sleep-related breathing disorders, insomnia, hypersomnia, circadian sleep-wake disorders, parasomnia, sleep-related movement disorders, and other sleep diseases [18]. Polysomnography (PSG), multiple sleep latency test (MSLT), wakefullness maintenance test (WMT), and actigraphy are the main diagnostic tests for sleep disorders. Sleep-related breathing disorders, parasomnias, sleep-related movement disorders, and some types of insomnia can be diagnosed by polysomnography. Actigraphy is a diagnostic test that detects limb movements by using a device worn either on ankle or wrist or both. Whether the patient is awake or asleep can be detected due to the limb movements, but neither sleep stages nor breathing disorders can be evaluated [48]. Actigraphy helps the detection of circadian sleep-wake disorders and insomnia, while MSLT and WMT are used for the diagnosis of hypersomnias [49].

We will discuss the effects of sleep disorders on primary headaches separately as follows:

#### **3.1 Insomnia**

Though the high incidence of comorbidity, insomnia is underestimated in patients with headache [19]. Insomnia is identified as difficulty to fall asleep, maintain sleep, or wake up earlier than planned, though all conditions, circumtances, and possibilities are sufficient to sleep [18]. Insomnia may be in relation with several painful symptoms like headache, especially with chronic forms rather than episodic [50, 51]. In patients with the diagnosis of fibromyalgia, insomnia related to pain was thought to be a result of increases in amount of arousals during sleep [52]. During night sleep, frequently seen awakenings may lead to a missing of pain inhibiton and patients may have decreased pain tresholds [24].

Insomnia is the most frequent disorder associated with chronic headache [53]. Nearly 50% of migraneurs may have insomnia symptoms, and insomnia is 1.8 times more in patients with tension-type headache (TTH) [54, 55]. Also, insomnia is a risk factor for the high rate of attacks and chronification for both migraine and TTH [56, 57].

Cognitive behavioral therapy widely used in the treatment of insomnia also decreases the frequency of accompanying headache [58].

#### **3.2 Obstructive sleep apnea**

Apnea-hypopnea index (AHI) is calculated by the detection of apneas (cessation of sleep for at least 10 seconds) and hypopneas (shallowing of breath for at least 10

*Sleep Patterns Changes Depending on Headache Subtype and Covariates of Primary Headache… DOI: http://dx.doi.org/10.5772/intechopen.106497*

seconds) by polysomnography. Obstructive sleep apnea syndrome (OSAS) is diagnosed when AHI is bigger than 5. AHI in the range of 5–15 is called mild, >15–30 as moderate, and >30 as severe OSAS. Obstructive sleep apnea headache is a secondary type of headache which is characterized by a headache attack that lasts upto 4 hours after awakening [18]. Morning headache is related to nocturnal hypoxemia **(**oxygen saturation ≤90 %**)** [59] and/or hypercapnia (PaCO2>45 mmHg) [60] due to recurrent apneas and/or hypopneas [61]. It has a good response to treatment and decreases or totally diminishes after an effective treatment of OSAS [5, 61, 62].

There may be a comorbidity with migraine, tension-type headache (TTH), cluster and hypnic headache, and OSAS [4, 63, 64]. Snoring which may be a component of sleep apnea is found to be more frequent in chronic types of headache than episodic forms [65]. Treatment of OSAS has favorable effects on the accompanying primary headache [66].

#### **3.3 Parasomnia**

Parasomnias are divided into two according to sleep stages as REM parasomnias and NonREM parasomnias. Somnambulism (sleepwalking), sleep terror, sleep-related eating disorders, and confusional arousal are NonREM parasomnias. Nightmare, recurrent isolated sleep paralysis, and REM sleep behavior disorder (RBD) are among REM parasomnias [18].

NonREM parasomnias are common in childhood and adolescent periods and mainly disappear in adulthood. Migraine with aura is more common than migraine without aura in sleepwalking patients [67]. The percentage of a history of sleepwalking in parents of the children with migraine is higher than the other types of headache [68]. As there is a circadian periodicity in NonREM parasomnias, serotonergic and orexinergic systems that have roles in migraine attacks were suspected to be responsible for the underlying comorbidity [69].

The frequency of nightmare, a REM parasomnia, is increased in migraneurs with an increase in awakenings during REM sleep [4, 70]. REM sleep behavior disease was also found to be in association with migraine headache and in relation with disability due to headache [71].

#### **3.4 Sleep-related movement disorders**

Restless legs syndrome (RLS) is the most common disorder in this group. It is an upleasant sensation that develops when patient lies to sleep or during inactivity or even resting and makes patients to be in need of moving the legs. The symptoms are mainly seen after evening, but in time they may also develop earlier in a day during resting. Sleep-related periodic limb movements also accompany in a majority of these patients [18]. Prevalance of migraine is high in RLS patients with a high frequency of headache attacks and more disability [72, 73]. Migraine prevalance in RLS is more than RLS in migraine [74].

Also there is an increased association with TTH and RLS [73, 75]. Dopaminergic dysfunction and iron metabolism are claimed for the common pathophysiology of migraine and RLS, while in TTH dopaminergic dysregulation is suspected to connect depression with RLS [76, 77].

Bruxism can occur both in sleep and wakefullness. Sleep bruxism is characterized by recurrent tightening or clenching of teeth with an increased jaw muscle activity during night [78]. Headache comorbidity was found to be higher in adults than

children [79]. Bruxism is found to be mainly associated with chronic migraine; nevertheless, the combination of bruxism with temporomandibular dysfunction is associated with both episodic and chronic migraine as well as TTH [53].

#### **3.5 Hypersomnia**

In this group, narcolepsy with cataplexia (type 1), narcolepsy without cataplexia (type 2), idiopathic hypersomnia, and recurrent hypersomnia have the main complaint of sleepiness during day [18]. As the disrupted orexinergic system is the main pathology in narcolepsy, migraine is claimed to be in association [80], but the results are conflicting. In a study, no association was found between narcolepsy and migraine, while the others found an increase of migraine attacks in narcoleptic patients and have suspected migraine as an independent risk factor [10, 33, 80].
