Introduction

Sleep disturbance and chronic pain are two common disease states which are bi-directionally interrelated with reciprocal interactions1,2. Each of them occurs with great frequency and results in significant public health and socioeconomic burden3,4. There is considerable evidence linking pain to disturbed sleep. Sleep disturbance is present in 67–88%5 of chronic pain patients, and at least 50%6 of individuals with insomnia suffer from chronic pain. It’s crucial to identify overlapped genetic and neural pathways correlated to two symptoms to explore etiological contribution towards the reciprocal relationship.

Genetics has been shown to explain as much as 50% of the variance in pain syndromes7 and 25%–45% for insomnia8. High genetic correlation (rg = 0.69) between pain and sleep disturbance has been reported using twins sample9, which implies a possible overlap in the genes affecting both sleep disturbance and chronic pain10. Genome-wide association studies (GWAS) have shown that chronic pain was associated with several genes involved in brain function and development and with a range of psychiatric traits11. GWAS for sleep disturbance related traits12 and insomnia13,14 have identified several significant loci and shared genetics with neuropsychiatric and metabolic traits. The large sample size GWAS data provided new ways to assess pleiotropy and genetic correlations between two related traits from a polygenic perspective. Multiple methods have been developed to accomplish this, including linkage disequilibrium (LD) score regression, which uses GWAS summary data to calculate genetic correlations between two traits15,16, polygenic score (PGS) association analysis17, which uses GWAS summary data of a trait to test whether the effect of a set of single-nucleotide polymorphisms (SNPs) is associated with another phenotype in an independent sample18. To our knowledge, the genetic correlation between sleep and pain has not been examined using GWAS data. The genetic correlation between pain and sleep disturbance requires further exploration especially from a polygenic perspective to reveal the mechanisms involved in this relationship.

Genetic association between chronic pain and sleep disturbance makes it especially interesting to search for possible neural mechanisms that may mediate the association. Neuroimaging exploration of the brain mechanisms underlying a bidirectional relationship between sleep disturbance and pain has been dominated by studies mapping the effects of sleep deprivation on pain responsivity19,20,21,22,23. Hyperalgesia engendered by sleep loss involves increasing pain reactivity associated with heightened somatosensory cortex activity and a corresponding decrease in insula and striatum activity22. Understanding the neural mechanisms underlying the interrelationship of sleep disturbance and chronic pain is a key factor in the development of new therapies, and network-based methods24,25,26 are useful for attaining the goal. Studies have shown that connectivity between the dorsal nexus and dorsolateral prefrontal cortex was susceptible to experimental sleep manipulation27. The detection and inhibition of nociceptive inputs could be modulated by the functional dynamics of brain networks23. Considering the complex relationship between genetic factors, brain networks and phenotypes, considerable efforts have been made to relate genetic variants to underlying neurobiological aspects using imaging-genetic methods28.

One hypothesis is that genetic factors contribute to phenotypes through the mediation of neurobiological changes. Mediation analyses are employed to better understand a known relationship by exploring the underlying mechanism or process by which one variable influences another variable through a mediator variable29. Two-sample Mendelian randomization (MR) is widely used to infer causal relationships between two traits based on GWAS summary data30 and has been used in many studies31,32. These analyses would facilitate to understand the causal relationship between chronic pain and sleep disturbance and the contribution of genetic factors and neurobiological features to this bi-directional relationship.

The goal of this study is to identify the genetic correlation and shared brain abnormalities of modulatory effects of the reciprocal relationships between sleep disturbance and pain, explore the interaction between genetics and aberrant neurobiology from polygenic aspects and inference their causal relationship, which will inform mechanisms involved in this relationship to facilitate new therapies and better treatment.

Methods

Participants and data

To explore the relationship between sleep disturbance and chronic pain, we analyzed phenotype data, imaging data and genotype data from 1206 participants (all obtained full informed consent) from the Human Connectome Project (HCP) database (March 2017 public data release) from the Washington University-University of Minnesota (WU-Minn HCP) Consortium. Research procedures and ethical guidelines were followed in accordance with Washington University institutional review board approval. To apply for the genotype data, the study was also approved by the Institutional Review Board of the Peking University Sixth Hospital. In addition, two large sample size GWAS summary data for sleep disturbance and chronic pain were downloaded from published studies for the combined analyses.

Phenotypes

The sleep phenotype of participants in the HCP was assessed by Pittsburgh Sleep Quality Index (PSQI), a validated self-reported assessment of sleep disturbance33. Participants’ self-reported experience of pain was measured by the National Institutes of Health (NIH) Toolbox Pain Intensity Survey34. A score was used to measure the average pain intensity in the past 7 days, which was used to measure their chronic pain (CP). More details about the phenotypes are described in the Supplementary Methods and Supplementary Fig. S1. Since the distribution of pain intensity score was not normal, we used a binary variable for pain (chronic pain binary, CPb). According to previous studies35, a pain intensity score ≥6 denotes severe pain, which was set as 1, and a pain intensity score ≤5 was set as 0. Because an average pain intensity above 5 leads to disruptions of function and mood, it’s conceptually distinct from mild pain36,37.

Genotype data

The genotype data for the HCP participants was requested from dbGaP under access number phs001364. Among the total 1206 participants, 1142 subjects were genotyped using Infinium Multi-Ethnic Genotyping Array. Quality control for the genotype data was described in Supplementary Methods. Since HCP contained many twins and siblings, after quality control, 429 independent individuals with 1,169,182 SNPs remained for the PGS association analysis. Principal component analysis (PCA) was performed for the genotype of 429 individuals for population stratification. The top 10 principal components (PCs) with a Tracy-Widom test p-value < 0.05 (Supplementary Fig. S2) were used as covariates in the subsequent PGS association analyses.

Imaging data and construction of whole-brain functional network

The HCP participants were scanned on a 3-T connectome-Skyra scanner (Siemens) using standard multiband blood oxygen level dependent (BOLD) acquisition. We acquired the resting-state data preprocessed by the HCP with its uniform method38. The participants with four resting-state data (two scans, and two directions for each scan) were used for the construction of whole-brain functional network. After preprocessing, the gray matter of the whole brain was parcellated into 250 regions employing the Shen atlas39. Nodal signals were created by averaging the regional blood oxygen level-dependent signals of all voxels within each region. Pearson cross correlations between all pairwise combinations of region signals were calculated for each participant, followed by z transformation to improve normality. The whole-brain functional connectivity network (250 × 250 regions with 31,125 edges) was constructed by further averaging the correlation coefficients of two directions of two scans.

GWAS summary statistics data of chronic pain and sleep disturbance

Large sample size GWAS summary data on chronic pain and sleep disturbance were used to explore their genetic correlations. The GWAS summary data of chronic pain was from a multisite GWAS of chronic pain in the UK Biobank, which included ~380,000 participants11. The PSQI is a widely used measure of sleep quality with high sensitivity (98.7%) and specificity (84.4%)40 for identifying primary insomnia33,41,42. Because there were no GWAS summary data on sleep disturbance, GWAS summary data on insomnia (i.e., the most common sleep disturbance) from a study of 1,331,010 individuals13 was used as a conceptual approximation of sleep disturbance.

Statistical analysis

The analyses flowchart is shown in Fig. 1 to explore the relationship between chronic pain and sleep disturbance. All the analyses below used age, gender, race (categorized as white or other), handedness, years of education, body mass index, blood pressure (systolic and diastolic), alcohol abuse diagnosis, smoke history, marijuana dependence diagnosis for lifetime as covariates.

Fig. 1: Flowchart of analyses.
figure 1

The analyses that were performed in this study included (1) phenotypic correlation, (2) genetic correlation using LD score regression and polygenic score (PGS) association analysis, (3) shared brain functional connectivity (FC) using network-based statistics method by analyzing rfMRI data, (4) association of the PGS with shared brain functional connectivity, and (5) causal relationship inference using Mendelian randomization (MR). HCP (Human Connectome Project) is the data source. N is the sample size for the analysis.

Phenotypic and genetic correlations between chronic pain and sleep disturbance

The phenotypic correlation between PSQI score and pain CPb was calculated using partial correlation after controlling the covariates as above using SPSS v26. To explore their genetic correlation, LD score regression analysis15,43 was conducted by using GWAS summary data on chronic pain11 and sleep disturbance13. LD score regression has been used in many studies to test the genetic correlations between two traits16. Then, we used PGS association analyses44 to investigate if the PGS of chronic pain was associated with sleep disturbance and vice versa. The PGS was calculated using GWAS summary data (discovery), and further regressed (linear regression for PSQI, logistic regression for CPb) with phenotype data in the HCP GWAS data (target) (see Supplementary Methods).

Identifying functional connectivity correlated with pain and sleep disturbance

To address the issue of multiple comparisons during identifying functional connectivity (FC) from the large brain network (31,125 edges), we used the network-based statistic (NBS) method24 to identify the FC correlated with PSQI total score. The NBS method is a well-validated tool for brain network association analyses that has been previously been used widely in neuroimaging studies25,26. A linear regression model was constructed after controlling for covariates to yield a t-test statistic, then the NBS method identified topological clusters using the test statistic threshold of 3.0 and further computed a family-wise error rate (FWER) corrected p-value for each component using 10,000 permutation testing to address the issue of multiple comparisons. The component with FWER corrected p-value < 0.05 was considered significant. The PSQI score associated FCs were further analyzed using logistic regression model for CPb with the same covariates as above to test if the sleep disturbance related FCs were associated with pain. The FCs with FDR adjusted p-value < 0.05 was considered significant.

Association of polygenic score of chronic pain/sleep disturbance with shared FC

To further explore if the shared FCs were associated with the PGS of chronic pain/sleep disturbance, we used PRSice v244 to run the PGS association analysis. Multiple PGS were created for chronic pain/sleep disturbance using the SNPs at p-value thresholds from 0 to 0.5 increasing by 0.00005. The association of the PGS with the correlation coefficient of each significant pair of FC was examined in linear regression model adjusting the covariates as above. The p-value threshold with the biggest Nagelkerke’s R2 was considered as the best-fit threshold. Due to the large number of non-independent tests performed, the p-value was adjusted by using 10,000 label-swapping permutations and the adjusted p-value < 0.05 was considered significant.

Mediation analysis

To explore how the shared FCs contribute to the association between chronic pain and sleep disturbance, we used model 4 in PROCESS45 to construct mediation models to analyze if the shared FC (mediation variable) mediated the association between chronic pain (independent variable/output variable) and sleep disturbance (output variable/independent variable). The same covariates as above were used in the model. N = 10,000 was used for bootstrap. Sobel test was further used to show the p-value which denotes if the indirect effect was different with zero. In addition, the mediation function of the shared FC for the association between the PGS and phenotype was assessed using the same models.

Two-sample Mendelian randomization for causal inference

To explore the causal relationship between chronic pain and sleep disturbance, we conducted two-sample MR analyses using the R package of database and analytical platform MR-Base30. The SNP p-value threshold for instrument variables was defined as p-value < 5.0 × 10−8. To avoid bias in the MR estimates due to LD (r2), clumping was applied using the ‘clump_data’ function with an r2 < 0.001. To combine estimates from individual genetic variants, we applied inverse-variance-weighted (IVW) regression to test the causal effect. Then, we used the MR Egger intercept test to test for directional horizontal pleiotropy, and IVW regression test for variant heterogeneity. Additionally, the MR Egger test46, weighted median test47, and MR-PRESSO48 and Contamination mixture49 methods were used for sensitivity tests.

Results

Phenotype correlation

After quality controls, total of 989 participants with all four resting-state imaging data, sleep data, pain data, and covariates were used for the phenotypic and neuroimaging analysis. Participants ranged from 22 to 37 years (mean = 28.73, standard deviation = 3.70) with 461 males and 523 females. The demographic data for the participants is shown in Table 1. In the regression models with all covariates, gender, race, handedness, education, BMI, alcohol abuse diagnosis and smoke history were associated with PSQI total score; gender, race and education were associated with CPb. After controlling for covariates, the correlation between PSQI total score and CPb values was significant (r = 0.171, p-value < 0.001).

Table 1 Demographic data for the participants and the correlation of each covariates with the phenotype data.

Genetic correlation between pain and sleep disturbance

LD score regression analysis showed chronic pain and sleep disturbance was significantly correlated at the genetic risk (rg = 0.5975 (0.0215), Z-score = 27.811, p-value = 3.20 × 10−170). PGS association analysis result (Supplementary Table 1) showed that PGS of chronic pain was significantly associated with PSQI total score (R2 = 0.0159, p-value = 6.47 × 10−3, Padjust = 0.0324, coefficient=1051.62, SE = 384.29); PGS of sleep disturbance was also significantly associated with CPb (R2 = 0.1102, p-value = 9.50 × 10−4, Padjust = 4.75 × 10−3, coefficient = 24399.30, SE = 7382.47).

Shared brain FC associated with chronic pain and sleep disturbance

The NBS method obtained one significant network component for PSQI (p-value = 0.0288), which included 239 edges and 144 nodes. Further regression for these 239 FCs with CPb showed nine FCs were significantly associated with pain. These nine shared FCs involved the prefrontal cortex (PFC), temporal gyrus, precentral/postcentral gyrus, anterior cingulate gyri, hippocampus and fusiform gyrus (Fig. 2a, b). All of them were significantly correlated with PSQI and CPb (Table 2).

Fig. 2: Chronic pain and sleep disturbance shared functional connectivities (FC) and the mediation function of the FC on the association between two phenotypes and the association between polygenic score and phenotypes.
figure 2

a Area with the nine FCs shared by PSQI and CPb, color is proportional to the links connected with the node. b Nine significant FCs with nodes and edges indicated, node size is proportional to the links connected with the node. c Mediation model for the mediation of the FC (“right middle temporal gyrus” - “right hippocampus”) for the correlation between PSQI and CPb. The mediation model for eight other significant FCs are shown in Supplementary Table 2. d Association results of PGS of chronic pain with FC (“right middle temporal gyrus” - “right hippocampus”) and mediation model for the indirect effect of PGS of chronic pain (CP) on PSQI through FC (“right middle temporal gyrus” - “right hippocampus”). SFGdor: superior frontal gyrus, dorsolateral; MFG: middle frontal gyrus; MTG: middle temporal gyrus; ITG: inferior temporal gyrus; ACC&PaCG: anterior cingulate & paracingulate gyri; HIP: hippocampus; FFG: fusiform gyrus; IFGtriang: interior frontal gyrus, triangular part; PreCG: precentral gyrus; PoCG: postcentral gyrus. For mediation model, X is independent variable, Y is outcome variable, M is mediation variable. Path a is the effect of X on M, path b is the effect of M on Y, path c is the effect of X on Y (total effect), c’ is the indirect effect of X on Y. PSQI: Pittsburgh sleep quality index; CP: chronic pain; CPb: chronic pain binary; PGS: polygenic score; #SNP: number of SNPs used to calculate PGS; P-th: p-value threshold to define SNPs with P < P-th to calculate the PGS.

Table 2 Shared functional connectivities (FC) between PSQI and CPb. PSQI is the Pittsburgh sleep quality index, CPb is the chronic pain binary.

Furthermore, we assessed whether the shared FCs mediated the association between PSQI and CPb. The mediation model for the FC “right middle temporal gyrus” - “right hippocampus” is shown in Fig. 2c. The mediation models for the other eight FCs correlated with PSQI and CPb are shown in Supplementary Table 2. Seven out of the nine shared FCs showed mediation function on both the effect of PSQI on CPb and the effect of CPb on PSQI. Connectivity “right precentral gyrus” - “left hippocampus” and “left superior frontal gyrus, dorsolateral” - “left anterior cingulate & paracingulate gyri” mediated the effects of PSQI on CPb but not on the other direction.

Association of polygenic score of chronic pain/sleep disturbance with brain FC

Given the association of chronic pain and sleep disturbance at both genetic and neural levels, we investigated if the PGS of chronic pain or sleep disturbance was associated with the shared FC, and identified one significant result: the PGS of chronic pain was significantly associated with the FC “right middle temporal gyrus” - “right hippocampus” (permutation adjusted p-value = 0.0402) (Fig. 2d). The association of the PGS of sleep disturbance with this FC obtained p-value = 9.4 × 10−3, but permutation adjusted p-value was not significant (adjusted p-value = 0.1517) (Supplementary Table 3).

We further analyzed if the PGS, which was associated with the FC (“right middle temporal gyrus” - “right hippocampus”), was associated with the phenotypes (CPb and PSQI) through the mediation function of this FC. The result showed the indirect effect of chronic pain PGS on PSQI mediated through this FC was significant (p-value = 0.0459, Fig. 2d), but the indirect effect of sleep disturbance PGS on CPb mediated through this FC was not significant (p-value = 0.1233) (Supplementary Table 4).

Causal relationship between chronic pain and sleep disturbance

The genetic correlation between chronic pain and sleep disturbance may arise from genes with pleiotropic effects. We used a bidirectional, two-sample Mendelian randomization approach to explore the causal relationship between chronic pain and sleep disturbance. As shown in Table 3, putative causal effects of both directions were detected using IVW regression analysis Mendelian randomization test (p-value = 1.65 × 10−14 for chronic pain as exposure, sleep disturbance as outcome, p-value = 9.69 × 10−7 for opposite). IVW regression test for variant heterogeneity showed that the heterogeneity was significant for both directions (p-value = 2.81 × 10−4 and 1.23 × 10−6 separately) but the MR Egger tests for directional horizontal pleiotropy were not significant (p-value = 0.95 and 0.051 separately). Additional sensitivity tests showed, for chronic pain as exposure, sleep disturbance as outcome, all other four methods had effects in the same direction as the IVW test although p-value for MR Egger test was not significant, but for sleep disturbance as exposure, chronic pain as outcome, weighted median, MR-PRESSO and Contamination mixture had the same direction with IVW test with significance but MR Egger had different direction (Table 3).

Table 3 Two-sample MR analysis results for chronic pain and sleep disturbance.

Discussion

To our knowledge, this is the first study to examine the underlying genetic and neurologic components of the association between chronic pain and sleep disturbance using a large study sample. Based on the phenotypic correlation between chronic pain and sleep disturbance, which is consistent with earlier findings, we identified their high genetic correlation. At the neural level, we identified shared functional connectivities involving the prefrontal cortex, temporal gyrus, precentral/postcentral gyrus, anterior cingulate gyri, hippocampus and fusiform gyrus, which further mediate the association of chronic pain with sleep disturbance. Furthermore, the chronic pain PGS was associated with the FC “right middle temporal gyrus” - “right hippocampus”, which mediated the association of chronic pain PGS with sleep disturbance. The Mendelian randomization analyses implied a possible causal relationship from chronic pain to sleep disturbance with stronger evidence than the other direction. These findings provide genetic and neural evidence for the co-occurrence of chronic pain and sleep disturbance.

The pleiotropic nature of genes implies that the PGS of chronic pain may also be associated with disturbed sleep and vice versa. The PGS association between chronic pain and sleep disturbance are consistent with phenotypic cross-sectional links and findings from previous twin studies which showed the relationship between sleep and pain to be confounded by shared genetic and environmental factors9,10,50.

Genetic components for the development of sleep disturbance and chronic pain likely reflect inherited vulnerability to the development of abnormal functional connectivity. Co-occurrence of sleep disturbance and chronic pain suggests that both might share some common underlying neurophysiological mechanism. Consistent with this possibility, we found that disturbed sleep and chronic pain were significantly correlated with nine FCs involving the prefrontal cortex, temporal gyrus, precentral/postcentral gyrus, anterior cingulate gyri, hippocampus and fusiform gyrus.

Increasing evidence shows that the prefrontal cortex (PFC) is a key brain region correlated with executive function, pain processing and vigilance, awareness, attention51 and development of chronic pain. People with higher PSQI have worse performance in tests of working memory and attentional set shifting52. Chronic pain patients exhibit significantly less deactivation in medial PFC and abnormal default mode network (DMN) activity while performing a visual attention task53. Sleep deprivation research22,23 also suggests increased pain sensitivity is positively correlated with FC between executive control network (ECN) and DMN, implies that sleep deprivation impaired cognitive networks could partially contribute to the sleep-pain dyad. The abnormal FC between PFC and anterior cingulate cortex (ACC) we found may demonstrate the deficiency in executive control, thus impairing the ability to transfer from DMN to ECN54. Connections of PFC and postcentral gyrus fits the latest model of perception of pain which requires the involvement of PFC55. Hyperalgesia might happen through impaired PFC function caused by sleep deficits.

As part of the limbic system, hippocampus could potentiate the sleep disturbance56 and make it vulnerable to neuropsychiatric disorders such as depression and chronic pain57. Decreased hippocampal neurogenesis is closely associated with memory deficits and aversive affective states in patients with chronic pain58. The memory network deficit revealed in chronic pain and sleep disturbed patient might be caused by the aberrant FC between temporal cortex and hippocampus which is demonstrated in our research. We also found the FC between middle temporal gyrus and hippocampus could mediate the association between chronic pain and sleep disturbance. Disrupted hippocampus-PFC connectivity predicts the transition from subacute to chronic pain59 and impairment in memory encoding and retrieval, decision-making60 and extinction learning61.

Furthermore, the shared brain FCs might in charge of properties of chronic pain and sleep disturbance through shared genetic risk, which may lead to sleep disturbances and chronic pain. The association of chronic pan PGS with the FC between right middle temporal gyrus and right hippocampus confirmed this hypothesis. The FC further mediated the indirect effect of the chronic pain PGS on sleep disturbance. Patterns of phenotypic overlap and comorbidity might share a direct etiological links which risk genes confer pleiotropic risk for multiple distinct brain phenotypes16.

Pain can be both a cause and a consequence of sleep disturbance. Meta-analysis of longitudinal studies found that a decline in sleep quality and quantity was associated with a two- to three-fold increase in the risk of developing a pain condition1. Our research supports both directions of causation, but the causation of sleep disturbance by chronic pain is more strongly supported (all methods had the same effect direction). Longitudinal studies1,9 report that pain and sleep often interact and negatively affect each other and the relationship is not unidirectional but more complex. Future longitudinal studies are needed to investigate direction of causation with more ingenious designs62.

Finding that chronic pain and sleep disturbance shared neural and genetic underpinnings is significant. Strengths of the present investigation are the large number of participants leading to robust findings, and evidence from both genetic and neural mechanisms obtained by integrating the imaging-genetics results. The mediation and MR causal analyses further helped to uncover the relationship between these two clinically important comorbidities. Currently, pharmacotherapy for chronic pain63 and insomnia64 has been woefully inadequate. The mediation effect of the aberrant FC that we identified in the present study may indicate potential increased efficacy and reproducibility target of neurostimulation to propose therapies to the patients who suffer from sleep disturbance and complicated by chronic pain.

There were several limitations in our study. The sample in the HCP database is from the young general population. The phenotypic correlation between sleep and pain is weaker than clinical samples, which resulted in relatively few reported pain intensity scores greater than 6. We used a pain intensity score threshold ≥6 to define the binary variable CPb. We also tried to define a threshold ≥3 for the regression analysis of PSQI and FCs, but there was no significant result (data not shown). The logistic regression model with a threshold ≥6 had significant intercept, whereas the threshold ≥3 did not, which may indicate that only severe pain affects brain FC. The PSQI score and pain variable that we used could only represent a portion of sleep disturbance and chronic pain. Additionally, gender is a factor influencing pain and sleep65,66. Further research to elucidate the mechanism underlying sex difference in pain and sleep is needed to reduce the disparities. Although the number of participants (n = 989) for imaging analysis is relatively large, the sample size for the PGS association analysis was small. Also, causal and mediation relationships between chronic pain and chronic pain results from MR analysis and mediation analyses were analyzed based on the sectional data. The results need further validation and exploration using larger independent samples in studies with longitudinal designs.

Conclusions

This study explored the association between chronic pain and sleep disturbance from different perspectives. The results revealed their high genetic correlation, identified shared brain functional connectivities mediated their association, built the link from the PGS of chronic pain to brain functional connectivity and further sleep disturbance, and possible causal relationship from chronic pain to sleep disturbance. Our results would have significant implications for understanding the mechanism of sleep and pain comorbidity and imply new treatment and interventions strategy for the comorbidity.