Objectives: The objective of this study was to evaluate the potential relationship between sleep disturbances and various types of constipation in patients. Methods: We conducted systematic searches in the research databases PubMed, EMBASE, Web of Science, and Cochrane Library to identify qualifying studies. Using Stata software version 14.0, we calculated the Odds Ratio (OR) and 95 % confidence interval (CI) for constipation in patients with sleep disorders. If P > 0.1 and I2 <= 50 %, we employed a fixed-effects model; otherwise, we applied a random-effects model. We assessed publication bias using funnel plots and Egger's test. Result: The pooled analysis demonstrated that individuals with sleep disorders were associated with an increased risk of all-cause constipation (OR = 1.47; 95 %CI: 1.31-1.64; I2 = 88.8 %, P<0.001). Specifically, both children (OR = 1.29; 95 %CI: 1.16-1.42; I2 = 63.8 %, P<0.001) and adults (OR = 1.65; 95 %CI: 1.39-1.97; I2 = 92.4 %, P<0.001) with a history of sleep disorders exhibited an increased risk of all-cause constipation.. Furthermore, patients with a history of insufficient sleep were also associated with an increased risk of constipation (OR = 1.33; 95 %CI: 1.20-1.46; I2 = 6.7 %, P<0.001). Additionally, patients with poor sleep quality were found to have an increased risk of constipation (OR = 1.56; 95 %CI: 1.0-2.45; I2 = 90.9 %, P = 0.05). Lastly, patients with insomnia were found to have the highest risk of constipation (OR = 1.94; 95 %CI: 1.37-2.76; I2 = 97.8 %, P< 0.001). Conclusion: This meta-analysis indicates that sleep disorders are associated with an elevated risk of constipation. Insomnia, poor sleep quality, and insufficient sleep duration all contribute to elevating the risk of constipation. These findings emphasize the significance of recognizing sleep disorders as an independent risk factor for constipation in both children and adults.