Background

A headache most often begins in the nerves of the blood vessels and muscles surrounding the head, neck, and face. Headaches can be set off by physical, emotional, or psychological stressors, muscle tension, enlarged blood vessels, and other factors. Tension headaches are the most common type of headache, which stem from tightening muscles in the head and neck. Stress and anxiety are primary causes of tension headaches. Migraine is the second leading type of headache, affecting roughly 1 in 10 people; they tend to run in families and are more common in women. These headaches are characterized by severe nerve pain that result in symptoms such as blurred vision and nausea, which may continue over several days [1,2,3].

Several papers and review articles have identified the comorbidity of headaches and mental illness and headaches and sleep disorders. Comorbidity often exists between migraine and stress, anxiety, depression, attention-deficit/hyperactivity disorder (ADHD), bipolar disorder (especially bipolar 2), obsessive compulsive disorder (OCD), panic disorder, post-traumatic stress disorder, sleep disturbances (circadian rhythm sleep-wake disorders, insomnia, narcolepsy, sleep apnea), social phobia, suicide, and more [3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18].

Studies have shown that people with migraine are more than twice as likely to experience various types of mental illness, with anxiety, depression, and insomnia having among the strongest associations [2, 4, 10, 19]. According to The American Migraine Foundation, people with migraine are 2–8 times more likely than the general population to have a sleep disorder. People with chronic migraine (15 or more days per month) have rates of insomnia twice that of those with less frequent headaches [20]. A study conducted in Italy found that patients with chronic headaches had higher levels of psychiatric comorbidity (anxiety and/or depression) (42.9% vs. 26.5%), insomnia (67.7% vs. 39.2%), hypersomnia (36.2% vs. 23.5%), and snoring (48.6% vs. 37.2%) [21]. A nationwide population-based postal survey conducted in France found that 50.6% of participants with active migraine experienced anxiety and/or depression [18]. On the other hand, research conducted in the USA found that 50% of patients with migraine were caused by sleep disturbances [17].

The relationship between headaches and mental illness is complex and bidirectional. In one study, past-year migraine significantly increased the risk of anxiety and mood disorder, after adjusting for other variables [16]. In another study, tension-type headaches and migraine stemmed from stress and depression [22]. Similarly, the relationship between headaches and sleep disorders is complex and bidirectional [23]. While sleep disturbance is a migraine trigger [17], sleep also plays a therapeutic role in eliminating the illness [8, 23]. Further, research shows not only that sleep disorders, especially insomnia, are more common among people with chronic episodes of migraine [23], but also that sleep disorders precipitate migraine (between 8.3% and 64% of the time) [17, 24]. Important precipitating factors in migraine beyond sleep disturbances include stress, noise, fatigue, fasting, hormonal factors (primarily menstrual cycle in women), weather changes, visual stimuli, certain odors, alcohol, and more [25]. However, some of these may also cause sleep disturbances.

Sleep disorders and headaches may occur simultaneously because of their relationship with another disorder [8, 26], such as mental illness, psychotropic drug use, or alcohol abuse [23, 27]. Positive relationships between mental illness (and psychotropic drug use) and sleep disorders have been shown in previous studies [27,28,29]. Psychotropic medications may have beneficial or adverse effects on sleep [29]. Similarly, excessive alcohol drinking is a precipitating factor for migraine and is also associated with problems falling asleep, irregular sleep-wake cycles, and less total sleep [30, 31].

While the comorbidity of both headaches and mental illness and headaches and sleep disorders is well established, the simultaneous comorbidity for all three is not well known. The purpose of this study is to identify the comorbidity of mental illness, sleep disorders, and headaches or migraine. Better understanding their comorbidity may improve potential treatments for individuals that suffer from these problems.

Methods

Study Population

The current study involved a retrospective cohort design based on individuals with health insurance from the Deseret Mutual Benefit Administrator (DMBA). Rates were determined from claims data. The company was established in 1970 to provide health insurance and retirement income to employees and their families of the Church of Jesus Christ of Latter-Day Saints. Electronic claims data were retrieved for the years 2017–2021. A “claim” is a notification to DMBA requesting a medical benefit payment. Geographic areas represented by employees included Utah (74%), Idaho (9%), Pacific states (9%), and other American states (8%).

Each year, the cohort consists of roughly 27% employees, 21% spouses, 48% dependent children, and 4% other (e.g., married child, stepchild, disabled dependent). Among employees, 34% work in the Church education system, seminaries, and institutes; 31% as manual laborers; 10% in other companies; 19% work in other capacities; and 6% are retired. Only non-retired employees are considered in this study. Employee retention is about 92% (80% in ages 18–29, 95% in ages 30–64, and 76% in ages 65 or older) from year to year. The number of employees insured through DMBA dropped as individuals aged 65 and older became eligible for Medicare.

Data Collection

The study involved DMBA employees ages 18–64 in 2017 (n = 21,360, M = 45.85, SD = 11.95), 2018 (n = 21,835, M = 45.96, SD = 11.86), 2019 (n = 21,663, M = 45.98, SD = 11.77), 2020 (n = 20,891, M = 46.28, SD = 11.61), and 2021 (n = 21,060, M = 46.20, SD = 11.59). These data represent employee eligibility data linked to automated medical claims records with a common identifying number. After the data were linked, prior to analyses, the database was de-identified according to Health Insurance Portability and Accountability Act (HIPAA) guidelines.

The Diagnostic and Statistical Manual of Mental Disorders (DSM) helps clinicians diagnose behavioral health issues [32]. The DSM diagnostic criteria are used by the International Classification of Diseases, Tenth Revision, Clinical Modification (ICD-10-CM) for determining billing codes [33]. Mental illness was identified using codes F01–F99. Codes used to classify specific types of mental illness were F20–F29 for schizophrenia, delusional, and other non-mood-psychotic disorders (hereafter called schizophrenia); F31 for bipolar disorder; F32–F33 for depression; F40–F41 for anxiety; F42 for obsessive-compulsive disorder (OCD); F43 for reaction to severe stress and adjustment disorders (stress); and F90 for attention deficit hyperactivity disorder (ADHD).

Sleep disorders were classified as any (insomnia, hypersomnia, circadian rhythm sleep disorders, sleep apnea, narcolepsy and cataplexy, parasomnia, and sleep-related movement disorders [G47]). Specific types of sleep disorders were also considered in this paper: insomnia (G47.0), hypersomnia (G47.1), sleep apnea (G47.3), and other sleep disorders (G47.2, G47.4, G47.5, G47.6, G47.8, and G47.9).

Codes used to classify migraine and headache are G43 and G44, respectively. Headaches are primary non-migraine headaches.

Rates of mental illness, sleep disorders, and migraine or headaches consist of the number of enrollees filing one or more claims for each condition divided by the number of enrollees. If multiple claims were filed each year for a specific condition, it is only counted once in the numerator of the rate calculation. However, an individual may contribute to more than one type of mental disorder or sleep condition each year. Because only more severe conditions tend to seek treatment, rates of conditions reported in this study will be lower than those provided by cross-sectional survey data. Specifically, the rates for mental illness are slightly lower than reported by US survey data for the corresponding years (SAMHSA, 2017–2021) (data not shown) [34,35,36,37,38], which is consistent with only more severe mental illnesses associated with a medical claim. The same reasoning applies for sleep disorders and migraine or headaches.

Other variables considered in this study are age, sex, marital status, dependent children status, annual salary, and year. Classifications for these variables appear in Table 1.

Table 1 Rates of migraine, headache, or either according to selected variables among DMBA employee, 2017–2021

Statistical Techniques

Numbers, percentages, means (M), and standard deviations (SD) describe the variables. Rates of mental illness, sleep disorders, migraine, or headaches were calculated. Distributions of comorbid mental illnesses were obtained for the index sleep disorders insomnia, hypersomnia, sleep apnea, and other sleep disorders, and for mental illnesses stress, anxiety, depression, ADHD, bipolar disorder, OCD, and schizophrenia. Distributions of comorbid sleep disorders were obtained for the same index sleep disorder and mental illness conditions. Rate ratios measured associations between sleep and mental variables and migraine or headaches, adjusting for age, sex, marital status, dependent children, annual household income, and year. We present rate ratios with their corresponding 95% confidence intervals. Two-sided tests of significance were used. The bound of the 95% confidence interval for the rate ratio estimate denotes statistical significance at the 0.05 level if it does not contain 1. Statistical analyses were derived from Statistical Analysis System (SAS) software, version 9.4 (SAS Institute Inc., Cary, NC, USA, 2012).

Results

Approximately 73.8% of employees are in the age range 30–59 years. Employees are most likely men, married, have dependent children, and have an annual salary less than $100,000 (Table 1). The rate of filing a claim for migraine is 2.21%, of headaches is 0.95%, and either migraine or headaches is 2.95%. The rate of migraine is significantly greater in employees that are in the age range 30–59 years, women, married, and in those with annual salaries at least $50,000. The rate of headaches is significantly greater in the age range 40–49 years and women. The higher rates in women are significantly greater for migraine than headaches; women are 190% more likely to have a migraine and 97% more likely to have a headache.

Rates of experiencing a sleep disorder or mental illness, along with their rates of comorbid mental illness, appear in Table 2. The rate of mental illness is 18.4% and of sleep disorder is 12.2%. Percentages of comorbid mental illness range from 31.6% for sleep apnea to 88.2% for schizophrenia. With respect to sleep disorders, percentages of comorbid stress, anxiety, depression, ADHD, bipolar disorder, OCD, and schizophrenia are greatest for those with insomnia (and hypersomnia for ADHD). With respect to mental illness, percentages of comorbid stress, anxiety, depression, bipolar disorder, or OCD are greatest for those with schizophrenia. The percentages of comorbid ADHD are greatest for those with bipolar disorder.

Table 2 Comorbid mental illness among DMBA employees, 2017–2021

Rates of comorbid sleep disorders for employees experiencing sleep disorders or mental illness appear in Table 3. Percentages of comorbid sleep disorders range from 17.0% for sleep apnea to 87.7% for hypersomnia. With respect to sleep disorders, percentages of comorbid insomnia, hypersomnia, and sleep apnea are greatest for those with other sleep disorders. Percentages of comorbid other sleep disorders are greatest for those with hypersomnia. With respect to mental illness, percentages of comorbid insomnia or other sleep disorders are greatest for those with schizophrenia; percentages of comorbid hypersomnia are greatest for those with ADHD; and percentages of comorbid sleep apnea are greatest for those with bipolar disorder.

Table 3 Comorbid sleep disorder among DMBA employees, 2017–2021

Rates of migraine, headache, or either according to sleep disorders and mental illness, adjusting for age, sex, marital status, salary, and year, appear in Table 4. Rate ratios are significantly positive, except for bipolar disorder by headache, OCD by headache, and schizophrenia by headache, wherein statistical insignificance may be related to small numbers. Rate ratios tend to be larger when the outcome is migraine versus headache. Insomnia is the sleep disorder with the strongest association with migraine or headache. Schizophrenia and then bipolar disorder are the mental illnesses most strongly associated with migraine. Stress and then anxiety are the mental illnesses most strongly associated with headaches.

Table 4 Rates of migraine, headache, or either according to sleep disorders or mental illness among DMBA employees, 2017–2021

In a model with the outcome variable migraine or headache regressed on each of the mental illness, sleep, and demographic variables, the significant variables are sex (Wald chi-squared [WQS] = 486), insomnia (WQS = 118), anxiety (WQS = 111), depression (WQS = 85), age (WQS = 56), sleep apnea (WQS = 46), salary (WQS = 16), marital status (WQS = 14), stress (WQS = 14), other sleep disorders (WQS = 11), bipolar disorder (WQS = 8), and ADHD (WQS = 4).

The rate of a mental illness only is 14.2%, the rate of a sleep disorder only is 8.0%, and the rate of a mental illness and sleep disorder is 4.2% (Table 5). The table also shows rates of migraine, headache, and either according to combinations of mental illness and sleep disorder status, after adjusting for age, sex, marital status, salary, and year. Each combination of sleep disorders and mental illness significantly increases the rate of migraine, headache, or either. The strength of the association is stronger for mental illness only versus sleep disorder only, and strongest for mental illness and sleep disorder. For example, those with a sleep disorder only are 133% more likely to have a migraine, those with a mental illness only are 162% more likely to have a migraine, and those with both are 289% more likely to have a migraine. Again, the rate ratios are slightly larger for migraine than headache.

Table 5 Rates of migraine, headache, or either according to sleep disorders and/or mental illness among DMBA employees, 2017–2021

For the three models represented in Table 5, interaction terms involving the demographic variables were assessed for statistical significance. No interactions were identified in the model involving migraine, but an interaction involving age was seen for headache (WQS p < 0.0001) and migraine or headache (WQS p = 0.0013). Rate ratios identifying the strength of the association between migraine or headache and sleep disorder only (vs. neither), and mental illness only (vs. neither), and sleep disorder and mental illness (vs. neither) are shown by age in Fig. 1. For each model, the rate ratios decrease with age group (on average per increase in age group of 0.70 for sleep disorder only, 0.12 for mental illness only, and 0.61 for sleep disorder and mental illness).

Fig. 1
figure 1

Rates of migraine or headache by sleep disorder and mental illness status and age for DMBA employees, 2017–2021

Discussion

Previous studies have identified the comorbidity of both migraine/headaches and sleep disorders or mental illness [39]. However, the simultaneous comorbidity for all three is less well understood. The current study identified the comorbidity of mental illness, sleep disorders, and migraine or headache.

The level of certain demographic variables corresponded to higher rates of migraine and headache. Age groups 30–59 (vs. 18–29) had higher rates of migraine, although ages 40–49 had higher rates of headache. These results align with data from the American Migraine Prevalence and Prevention (AMPP) study and the World Health Organization [2, 40, 41]. Higher rates of migraine or headache in women are also consistent with the literature [1, 3, 40]. This is influenced by hormonal changes, especially sudden drops in estrogen during the menstrual cycle [42]. While women (vs. men) have higher rates of migraine or headache, the strength of the association is significantly greater for migraine. This is consistent with women having more frequent, lasting headaches [43].

Comparatively, being married (vs. single) is associated with higher rates of migraine but not headaches. Research has shown that marital stress can contribute to daily migraine and that migraine can negatively affect marriage, more so for chronic migraine than episodic headaches [44, 45]. As marriage is negatively affected, these people may see a greater need to seek treatment than those not in a relationship.

Unlike age, sex, and relationship status, having dependent children and salary were not significantly associated with migraine or headache. Although children may increase stress that can cause migraine, women with chronic migraine may choose not to have children. These individual choices or environmental factors could influence associations. However, we cannot address these issues with our data. Also, the high number of employees with missing salary information limits drawing any conclusions about salary and migraine or headache.

The results are consistent with other studies showing that comorbid mental illness is common in those with sleep disorders [45,46,47,48]. Previous research has identified comorbid anxiety and depression with obstructive sleep apnea [49, 50]. Other studies have also assessed comorbid sleep disturbances and ADHD [51], comorbid sleep disturbances and schizophrenia [52], and comorbid obstructive sleep apnea and anxiety, bipolar disorder, and schizophrenia [53]. Insomnia is associated with higher levels of each of the mental illnesses considered than sleep apnea. This may be because insomnia has a stronger bidirectional relationship, with sleep apnea more likely to just cause mental illness. Anxiety is the most common mental disorder associated with insomnia. Insufficient sleep can spur anxiety, and anxiety can make it difficult to sleep [54].

The comorbid relationship between sleep apnea and hypersomnia is high. While sleep apnea may be directly influencing hypersomnia, it is possible that other factors contributing to sleep apnea are also contributing to hypersomnia [55].

Generally, rates of migraine or headache are associated with sleep disorders and mental illness. Higher rates of migraine or headache are most pronounced for people with insomnia. Previous research has identified insomnia as being by far the most common sleep disorder in headache patients [23, 56]. This may be because insomnia is more likely to be both a precursor and result of headache, especially migraine, which is suggested by our result that the higher rates of migraine and headaches among people with insomnia are noticeably more pronounced for migraine. Consistent with our results, a review article identified studies showing that sleep disturbances trigger both migraine and tension headaches and that insomnia is more common in both migraine and non-migraine headache sufferers than in those without these conditions [57].

Schizophrenia, bipolar disorder, and depression had the strongest associations with migraine, as consistent with other findings [58]. These are the more serious mental illnesses and may reflect a common risk factor. A recent study identified shared molecular mechanisms between migraine and schizophrenia and depression [59]. The strength of the association between these mental illnesses and migraine is also noticeably greater than between these mental illnesses and headaches. This may emphasize that the common genetic underpinning of migraine, which is a neurological disorder, and mental illness is distinct from headache, which describes a variety of different pain symptoms, and mental illness.

Sleep disorder only, mental illness only, and both sleep disorder and mental illness significantly increase the rate of migraine, headache, or either. The strength of the association increases from sleep disorder only to mental illness only to both sleep disorder and mental illness. The associations are stronger for migraine than headache. While other studies show that migraine or headache are comorbid with sleep disorder or mental illness, this study shows that they are most likely simultaneously comorbid with both sleep disorder and mental illness, especially migraine, which implicates a neurological basis (including genetic disorders, congenital abnormalities or disorders, infections, lifestyle or environmental health problems, and injury to the brain, spinal cord, or nerves). Medication for treating neurological conditions may also play a role.

Higher rates of migraine or headache for having both sleep disorder and mental illness (vs. neither) than sleep only or mental only are seen across the age groups. Further, the significantly higher rates of migraine or headache for those with both sleep disorder and mental illness are significantly greater for those aged 18–39 (vs. 40–64). Perhaps people who are older have learned to better deal with their migraine or headache or are more likely to receive medication so that consequential sleep disorder or mental illness is less pronounced. Moreover, people within an older age group may experience different types of stress and life scenarios, which can influence migraine, thereby affecting sleep and mental disorders.

The number of employees who filed healthcare claims for migraine or headache was smaller than what exists in the population and may reflect more serious cases. Assessing relationships between these cases and certain rare mental health conditions were limited by small numbers. Also, the study results are based on an employee population, so generalization of the results is limited to this type of population, who are generally healthier than the nonworking population. The current study is limited to identifying statistical associations and not causal relationships. The causal directions involved are complex and often bidirectional. Of further note is that the current study population does not include individuals aged 65 years or older. Migraines and headaches in more senior adults may be more likely triggered by comorbid disease and pain than in younger people where hormonal changes are often involved.

Conclusion

Associations between migraine or headache and sleep disorders and mental illness are complex and bidirectional. High comorbidity exists among these conditions, emphasizing their close interrelationship. While people with a sleep disorder or a mental illness are at increased risk of migraine or headache, the increased risk is greatest when both sleep disorder and mental illness are present. The associations appear to be greatest in younger aged adults and for migraine compared with headache. The comorbidity of migraine or headache and sleep disorders and mental illness should be considered as physicians determine the best course of treatment for their patients.