Introduction
Mental health disorders are among the leading causes of disease burden worldwide, accounting for 970 million cases in 2019 [1]. Depression and anxiety disorders are the most common mental health disorders, with an estimated 322 million and 264 million people worldwide affected, respectively [2, 3]. Globally, sleep disorders have become a major public health problem with an increasing prevalence [4], and a large body of research has shown that depression and anxiety are frequently comorbid with sleep disorders [5], which threaten people’s health and quality of life and impose an enormous social and economic burden [6, 7].
Constipation is one of the most common functional gastrointestinal diseases, affecting about 2.5–79% of adults worldwide [8]. Previous studies have shown that depression, anxiety, and sleep disorders are associated with an increased risk of constipation [9–11], and patients with constipation also seem to be at a higher risk of depression, anxiety, and sleep disorders [12–14]. However, some other studies have yielded conflicting results [15–18]. The existing observational studies usually have a limited sample size, and results from observational studies are likely to be affected by causality bias and confounding factors, making it impossible to determine causal associations.
In recent years, Mendelian randomization (MR) has been widely used to investigate causal associations [19, 20]. Using randomly allocated genetic variants as instruments, the MR approach could avoid biases caused by residual confounding and reverse causality on the basis of three stringent assumptions [21, 22]. Multivariable MR (MVMR) is a recently developed extension of MR that allows separate but correlated traits to be assessed simultaneously by clumping and harmonizing genetic variants from each exposure into the same model [23–25].
In the present study, we used the genetic summary statistics from the largest genome-wide association studies (GWASs) to investigate the bidirectional associations of depression (major depression (MD), broad depression (BD), and depressed affect), anxiety (anxious feelings, worry), and sleep disorders (sleep duration, sleeplessness) with constipation. In this study, univariable MR analysis was first performed to estimate the direction of the associations, and MVMR analyses were then performed to assess the independent effects of correlated exposures on the outcome.
Material and methods
Study design
This is a two-sample, bidirectional MR study to assess the bidirectional causal associations of depression, anxiety, and sleep disorders with constipation (Figure 1). This study included three depression traits (MD, BD, depressed affect), two anxiety traits (anxious feelings, worry), and two sleep disorder traits (sleep duration, sleeplessness). The genetic summary statistics for each trait were extracted from different GWASs. Genetic variants utilized as instruments for MR analyses rely on three assumptions: (I) the genetic instruments must be associated with the exposure; (II) the genetic instruments are independent of confounding factors; (III) the genetic instruments influence the outcome only through the exposure [26]. We also conducted reverse MR with constipation as the exposure and other selected traits as the outcomes. Given the considerable clinical and genetic overlap between depression, anxiety, and sleep disorders [27, 28], we further performed MVMR analyses to estimate the independent effects of correlated mental disorders and sleep disorders on constipation.
Figure 1
Overview and assumptions of the Mendelian randomization study. Genetic variants utilized as instruments for Mendelian randomization analysis rely on three assumptions: (I) the genetic instruments must be associated with the exposure; (II) the genetic instruments are independent of confounding factors; (III) the genetic instruments influence the outcome only through the exposure

Data sources
In this MR study, GWAS summary data used in the analyses were derived from the IEU OpenGWAS project (https://gwas.mrcieu.ac.uk). To evaluate the effects of depression on constipation, we used three depression subtypes: MD (Dataset ID: ieu-b-102), BD (Dataset ID: ebi-a-GCST005902), and depressed affect (Dataset ID: ebi-a-GCST006475) (Supplementary Table SI). The summary data for MD, including 170,756 cases and 329,443 controls, were generated from the UK Biobank and the Psychiatric Genomics Consortium (PGC) [29]. The GWAS summary statistics for BD (113,769 cases and 208,811 controls) and depressed affect (357,957 individuals) were generated from the UK Biobank data [30, 31]. In the UK Biobank, BD was defined by self-reported past help-seeking behaviors due to personal mental health difficulties, and MD was identified from hospital admission records and coded using the International Classification of Diseases 10th revision (ICD-10) [31]. Summed scores on four Revised Eysenck Personality Questionnaire items (“Does your mood often go up and down?”; “Do you ever feel ‘just miserable’ for no reason?”; “Do you often feel ‘fed-up?’”; “Do you often feel lonely?”) were obtained for the depressed affect cluster [30]. In the PGC, the diagnosis of lifetime MD based on the Diagnostic and Statistical Manual of Mental Disorders, Fourth Edition (DSM-IV) was determined using structured diagnostic instruments from clinician-completed checklists or direct assessments by trained interviewers [32]. Compared to the less restrictive BD or depressed affect diagnostic criteria, the determination of MD was more stringent. Previous studies have indicated that self-reported depression was genetically highly associated with clinically diagnosed depression [33, 34].
Subtypes of anxiety used to evaluate the relationship between anxiety and constipation included anxious feelings (Dataset ID: ukb-b-6519) and worry (Dataset ID: ebi-a-GCST006478) (Supplementary Table SI). Worry, a cardinal feature of generalized anxiety disorder, is a coping mechanism for possible threats in the future [35]. The GWAS summary statistics for anxious feelings (255,812 cases and 194,953 controls) and worry (348,219 individuals) were sourced from the UK Biobank [30], and the diagnoses were based on questionnaires. For instance, to assess anxiety disorders, participants from the UK Biobank participants were asked: “Have you been diagnosed with one or more of the following mental health problems by a professional, even if you don’t have it currently?” [36]. Similarly, summed scores on four other Eysenck Personality Questionnaire-Revised Short Scale (EPQ-RS) items (“Would you call yourself a nervous person?”; “Are you a worrier?”; “Would you call yourself tense or ‘highly strung’?”; “Do you suffer from ‘nerves’?”) were obtained for the worry cluster [30]. The subtypes of sleep disorders included in this study were sleep duration (460,099 individuals; Dataset ID: ukb-b-4424) and sleeplessness (336,965 individuals; Dataset ID: ukb-a-13) (Supplementary Table SI). Sleep duration was self-reported by participants with the standardized question: “About how many hours of sleep do you get in every 24 h? (Please include naps)” [37]. Self-reported sleeplessness was assessed using the question: “Do you have trouble falling asleep at night or do you wake up in the middle of the night?”; participants who responded with “usually” were classified as having frequent sleeplessness symptoms, while the other participants were classified as the control group [38].
Summary statistics on constipation (Dataset ID: finn-b-K11_CONSTIPATION), including 17,246 cases and 201,546 controls, were obtained from the latest FinnGen studies [39]. The FinnGen project was approved by the Coordinating Ethics Committee of the Hospital District of Helsinki and Uusimaa (No: HUS/990/2017), and all participants in these studies had written informed consent [39]. The UK Biobank studies were reviewed and approved by the North West Multi-Centre Research Ethics Committee (No: 11/NW/0382) [40]; participants included in these studies were predominantly of European ancestry.
Genetic instrument selection
An overview and flow diagram of genetic instrument selection is shown in Figure 2. Independent single nucleotide polymorphisms (SNPs) with genome-wide significance (p < 5 × 10–8) were selected as the instrumental variables (IVs). Stringent clumping criteria (r2 cutoff = 0.001, clumping window = 10,000 kb) were used to ensure the independence of SNPs. The strength of IVs was measured using F-statistics, where an F-statistic greater than 10 indicated greater strength of the instrument [41]. The PhenoScanner database was then searched for SNP-phenotype associations to remove the SNPs correlated with mediators or confounders [42, 43]. Several potential confounding factors for constipation, including common gastrointestinal disorders (such as Crohn’s disease and intestinal tumors), sedentary behavior, and inadequate fiber and fluid intake, were excluded. We also removed palindromic SNPs when harmonizing the effects of SNPs on each outcome and exposure. The Mendelian Randomization Pleiotropy Residual Sum and Outlier (MR-PRESSO) test was further performed to identify and remove SNPs with horizontal pleiotropic effects [44]. Eventually, we extracted 46 SNPs for MD, 16 SNPs for BD, 57 SNPs for depressed affect, 63 SNPs for anxious feelings, 59 SNPs for worry, 67 SNPs for sleep duration, and 29 SNPs for sleeplessness (Supplementary Excel File 1). For the reversed direction, we only found one SNP (rs185003380, p = 4.976E-08) associated with constipation with a P-value of < 5 × 10–8. Therefore, we adopted a less stringent threshold (p < 5 × 10–6), and extracted 19 SNPs for constipation. The F-statistics of all selected SNPs were greater than 10, suggesting that weak instrument bias is unlikely [45] (Supplementary Excel File 1). The MVMR analyses incorporated genetic variants obtained from selected traits, which extracted 156 SNPs for analysis.
Figure 2
Overview and flow diagram of genetic instrument selection. A – Flow diagram of forward Mendelian randomization. B – Flow diagram of reverse Mendelian randomization
MR – Mendelian randomization, SNPs – single nucleotide polymorphisms, GWAS – genome-wide association study, MR-PRESSO – Mendelian Randomization Pleiotropy Residual Sum and Outlier.

Statistical analysis
In the present study, the inverse-variance weighted (IVW) method and MVMR were applied as the principal analytical approaches. In univariable MR analysis, the random-effects IVW method was preferentially applied in the presence of heterogeneity (Cochran’s Q test p < 0.05); otherwise, the fixed-effects IVW method was preferentially used. Despite the IVW method being an authoritative method, the results from other methods (maximum likelihood [46], Robust Adjusted Profile Score (MR-RAPS) [47], and MR-PRESSO [44]) with different assumptions were also assessed for sensitivity and to ensure the robustness of the results. Given that genetic instruments for different anxiety and depression traits are correlated [48, 49], we further performed MVMR analyses to estimate the independent associations between each trait of interest and constipation. For sensitivity analyses, the IVW (Q) method was used to identify heterogeneity, the MR-PRESSO global test and MR-Egger intercept test were used to detect potential horizontal pleiotropy, and leave-one-out analysis was performed by excluding a single SNP to assess the robustness of the results [50]. In univariable MR analyses, the association with a P-value of < 0.007 (Bonferroni correction p = 0.05/7 = 0.007) was considered a significant association, and the association with p < 0.05 was considered suggestive. In MVMR models, a P-value of < 0.05 was considered significant. All the MR analyses were conducted using the TwoSampleMR (version 0.5.6) [51], MR-PRESSO [44], and mr.raps [52] packages in the R software (version 4.3.1).
Results
Univariable MR analyses
Significant evidence supporting the causal effects of depression on constipation was found. The univariable MR analyses indicated that genetically determined MD (IVW: odds ratio [OR] = 1.28; 95% confidence interval [CI]: 1.12–1.46; p = 2.68E-04), BD (IVW: OR = 3.72; 95% CI: 1.55–8.97; p = 3.31E-03), and depressed affect (IVW: OR = 1.41; 95% CI: 1.13–1.76; p = 2.65E-03) were significantly associated with a high risk of constipation (Figure 3 A). The result of MD was replicated by maximum likelihood (p = 2.42E-04), MR-RAPS (p = 4.93E-04), and MR-PRESSO (p = 4.39E-04); the result of BD was replicated by maximum likelihood (p = 3.00E-03); and the result of depressed affect was also replicated by maximum likelihood (p = 2.47E-03), MR-RAPS (p = 2.81E-03), and MR-PRESSO (p = 3.12E-03) (Supplementary Table SII). In the reverse MR analyses, no significant associations were found between constipation and the risk of MD, BD, and depressed affect (Figure 3 B, Supplementary Table SIII).
Figure 3
MR estimates of the associations of depression, anxiety, and sleep disorders with constipation. A – Univariable MR analysis; B – reverse MR analysis; C – multivariable MR analysis; MR, Mendelian randomization; odds ratio (OR) and 95% confidence intervals (95% CI) were derived using the inverse-variance weighted method

Genetically determined worry was also significantly associated with an increased risk of constipation in univariable MR analyses (IVW: OR = 1.42; 95% CI: 1.13–1.77; p = 2.11E-03) (Figure 3 A), which was replicated by maximum likelihood (OR = 1.43; 95% CI: 1.14–1.79; p = 1.89E-03) (Supplementary Table SII). Similarly, MR-RAPS and MR-PRESSO also indicated a suggestive association between worry and the risk of constipation. No evidence was found for the effects of constipation on worry, and no significant or suggestive association was found between anxious feelings and constipation (Figure 3 B, Supplementary Table SIII).
The results of sleep duration and sleeplessness are presented in Figures 3 A and B. In univariable MR analyses, we found a negative correlation between sleep duration and constipation, and a positive correlation between sleeplessness and constipation; however, neither of the correlations was statistically significant. The reverse MR analyses also suggested no significant relationship between constipation and the risk of sleep duration or sleeplessness (Figure 3 B, Supplementary Table SIII).
MVMR analyses
The results of MVMR analyses are reported in Figure 3 C. In the MVMR analyses, MD, BD, depressed affect, anxious feelings, worry, sleep duration, and sleeplessness were mutually adjusted, which demonstrated a robust causal association between MD and constipation (OR = 2.06; 95% CI: 1.11–3.80; p = 2.12E-02). With regard to worry, the direction of association and effect size were similar to those obtained from the univariable MR but were not statistically significant (OR = 1.64; 95% CI: 0.84–3.19; p = 1.46E-01). There was no evidence for the causal effects of other traits on constipation.
Sensitivity analyses
The MR-PRESSO test was conducted, which detected and excluded one outlier (rs 599550) when estimating the effects of depressed affect on constipation, as well as one outlier when estimating the effects of constipation on anxious feelings (rs 7610243) and worry (rs 114066486), respectively. Cochran’s Q test indicated the presence of heterogeneity for anxious feelings (Qexposure = 77.53, pexposure = 4.43E-02; Qoutcome = 31.47, poutcome = 7.59E-03) and sleep duration (Qexposure = 92.36, pexposure = 9.37E-03) (Table I). No pleiotropy was detected using the MR-Egger regression intercept analysis and the MR-PRESSO global test (Table I). With regard to sensitivity analysis, the results of the leave-one-out analysis did not show any significant differences from the primary results (Supplementary Figures S1–10).
Table I
Heterogeneity and horizontal pleiotropy estimates of the Mendelian randomization analyses
Discussion
To the best of our knowledge, this is the first MR study to explore the bidirectional causal associations of depression, anxiety, and sleep disorders with constipation. In the present study, we identified the causal effects of MD, BD, depressed affect, and worry on constipation. The MVMR analyses indicated that MD had a robust causal association with constipation, whereas the effects of BD and depressed affect were completely reversed after adjustment. The effect of worry on constipation was similar in direction to the finding of the univariable MR but was no longer statistically significant after adjustment for depression and other potential confounders. The reverse MR analyses found no evidence for the causal associations between constipation and MD, BD, depressed affect, anxious feelings, worry, sleep duration, and sleeplessness.
A large body of evidence has suggested that depression is associated with an increased risk of constipation [53–55]. A recent cross-sectional study indicated that individuals with depression are at a significantly higher risk of constipation [10]. Another recent study involving 31,191 participants from the National Health and Nutrition Examination Survey (NHANES) reported that depressive symptoms are associated with elevated odds of constipation, and those with constipation were more likely to have depression [11]. Similarly, a study that included 73,047 women suggested that the prevalence of depression was higher among women with constipation compared with those without depression [56]. A recent meta-analysis of 39 studies from China, involving 124,079 participants, indicated that depression might lead to a higher prevalence of constipation (OR = 3.16; 95% CI: 1.96–5.11) [57]. However, a cross-sectional study using NHANES data indicated that only mild depression, not moderate and severe depression, was significantly associated with constipation [16], and a meta-analysis also showed that irritable bowel syndrome with constipation was not significantly associated with an increased risk of depression [15]. Despite the relatively large body of observational studies investigating the bidirectional association between depression and constipation, the sample size was still relatively small, and robust evidence of the causal associations is still insufficient. The present study demonstrated that MD was causally associated with an increased risk of constipation, whereas the effects of BD and depressed affect detected in the univariable MR analysis might be attributed to confounders such as MD and worry. This reminds us of the potential confounding factors in the investigation of the effects of BD and depressed effect on constipation. The result that constipation was not associated with the risk of depression was not consistent with those from prior observational studies, which might be related to reverse causality and residual confounding.
To our knowledge, this is the first study reporting a potential association between worry and constipation. Prior studies have found that worry might be a pathological process underlying mood disorders and anxiety [58, 59]. A cross-sectional study involving 9,264 participants showed that anxiety was associated with an increased risk of constipation (OR = 1.38; 95% CI: 1.15–1.65) [60], and another study suggested that a high level of anxiety was an independent risk factor for constipation [61]. A meta-analysis also demonstrated that the level of anxiety was higher among patients with irritable bowel syndrome and constipation [15]. In the present study, the effect of worry on constipation remained the same in terms of direction but was no longer significant after adjustment for depression, anxiety, and sleep disorders. Furthermore, we found no evidence to support a causal association between anxious feelings and constipation. In the reverse analyses, constipation was not associated with an increased risk of anxious feelings or worry. To further investigate these associations, future studies are warranted.
Few studies have examined the effects of sleep duration and sleeplessness on constipation. A cross-sectional study involving 3,204 participants reported that sleep disorders were associated not only with anxiety and depression but also with a higher prevalence of constipation [62]. Another recent cross-sectional study involving 17,529 shift workers showed that the OR for constipation in individuals with severe sleeplessness was 4.17 times higher than that in individuals without sleeplessness [63]. Our results in univariable analyses indicated that sleep duration was negatively associated with constipation, whereas sleeplessness was positively associated with constipation; although these associations were not statistically significant, they were in line with previous findings. However, in multivariable analyses, the effects of sleep duration and sleeplessness on constipation were attenuated to null, suggesting the possible influence of confounders.
The mechanism underlying the associations between depression and constipation is still largely underexplored. Previous studies suggested that disorders of the brain-gut axis might play an important role [64, 65]. For instance, through the joint work of the hypothalamic-pituitary-adrenal axis, autonomic nervous system, and enteric autonomic nervous system, psychological factors can directly or indirectly mediate gut motor, permeability, luminal secretions, and mucosal immune function [64, 66]. The autonomic responses to visceral stimulations in turn lead to signaling to the brain, thereby affecting the brain area related to emotional regulation [65, 67]. The gut microbiota has also been found to be a key regulator of the connection between depression and constipation [68]. Studies have shown that the gut microbiota is significantly altered in patients with depression [69, 70], and probiotics appear to improve constipation symptoms as well as depressive symptoms [71–73]. In addition, a variety of depression-related factors, such as the use of antidepressants, sedentary behaviors, dietary changes, and sleep disturbances, may further exacerbate constipation [74, 75].
This study has several limitations. First, the phenotype definitions in the UK Biobank are partially based on self-reported data or structured questionnaires, which could introduce misclassification bias. Second, detailed information regarding the severity and duration of depression, anxiety, sleep disorders, and constipation was not available in the summary-level datasets. It would be valuable to explore the impact of symptom severity and duration on this issue. Third, our study could not eliminate the effect of canalization (i.e., dilution of the gene-exposure association); consequently, the estimate may be subject to inflation. Fourth, the existence of certain heterogeneities in SNPs may introduce potential bias, affecting the robustness of the MR results. Finally, since the UK Biobank predominantly includes individuals of European ancestry, the generalizability of our findings to other populations may be limited.
In conclusion, the present study demonstrated that MD may be causally associated with constipation, even after accounting for anxiety, sleep disorders, and other subtypes of depression. Thus, the identification and management of constipation should be highlighted for patients with MD. Worry might also increase the risk of constipation, but this finding needs to be further investigated. We did not find evidence supporting the causal effects of constipation on depression, anxiety, and sleep disorders. Future studies should pay more attention to the possible reverse causality bias and confounding factors.

