Background: Previous studies suggested an association of sleep disorders with inflammatory bowel disease (IBD) and indicated that using pharmacological treatments for the modulation of circadian rhythms might prevent IBD pathogenesis or aggravation, but whether the effect of sleep traits on IBD was causal is inconclusive and, therefore, prevents drug repurposing based on the previous studies. We aimed to examine the causal effect of different sleep traits on the pathogenesis of IBD.Methods: Genetic instruments for sleep traits were selected from the largest GWAS studies available in the UK Biobank (n = 449,734) and the 23andMe Research (n = 541,333). A two-sample Mendelian randomization (MR) study was conducted to examine the association of the genetic instruments with IBD (12,882 cases and 21,770 controls), ulcerative colitis (6,968 cases, 20,464 controls), and Crohn’s disease (5,956 cases and 14,927 controls). We applied the inverse-variance weighted (IVW) method to estimate causal effects, and we used the weighted median and MR-Egger method for sensitivity analyses.Results: We found that sleep duration (OR, 1.00, 95% CI 1.00–1.01), short sleep duration (OR, 1.07, 95% CI 0.41–2.83), morningness (OR, 1.05, 95% CI 0.87–1.27), daytime napping (OR, 1.64, 95% CI 0.62–4.4), frequent insomnia (OR, 1.17, 95% CI 0.8–1.72), any insomnia (OR, 1.17, 95% CI 0.69–1.97), and snoring (OR, 0.31, 95% CI 0.06–1.54) had no causal effect on IBD, and these sleep traits had no causal effect on ulcerative colitis and Crohn’s disease either. Most of the sensitivity analyses showed consistent results with those of the IVW method.Conclusion: Our MR study did not support the causal effect of sleep traits on IBD. Pharmacological modulation of circadian rhythms for the prevention of IBD pathogenesis was unwarranted.