ImportanceInsomnia has been associated with altered inflammatory response as well as increased risk of infections and sepsis in observational studies. However, these studies are prone to bias, such as residual confounding. To further understand the potential causal association between insomnia and sepsis risk, a 2-sample Mendelian randomization (MR) approach should be explored.ObjectiveTo evaluate whether genetically predicted insomnia is associated with risk of sepsis.Design, Setting, and ParticipantsTwo-sample MR was performed to estimate the association between genetically predicted insomnia and sepsis risk. Data were obtained from a genome-wide association study identifying 555 independent genetic variants (R2 < 0.01) strongly associated with insomnia (P < 5 × 10−8). Sensitivity analyses were conducted to address bias due to pleiotropy and sample overlap, along with mediation analyses and sex-stratified analyses. The insomnia data set included 2.4 million individuals of European ancestry from the UK Biobank and 23andMe. For sepsis, 462 918 individuals of European ancestry from the UK Biobank were included. Data were extracted between February and December 2022 and analyzed between March 2022 and March 2023.ExposureGenetically predicted insomnia.Main Outcome and MeasureSepsis.ResultsThere were 593 724 individuals with insomnia and 10 154 cases of sepsis. A doubling in the population prevalence of genetically predicted insomnia was associated with an odds ratio of 1.37 (95% CI, 1.19-1.57; P = 7.6 × 10−6) for sepsis. Sensitivity analyses supported this observation. One-third of the association between genetically predicted insomnia and risk of sepsis was mediated through a combination of cardiometabolic risk factors for sepsis (body mass index, type 2 diabetes, smoking, or cardiovascular disease; overall proportion, 35.2%; 95% CI, 5.1-76.9). The association between insomnia and sepsis was more pronounced among women compared with men (women: odds ratio, 1.44; 95% CI, 1.24-1.68; men: OR, 1.10; 95% CI, 0.86-1.40).Conclusions and RelevanceThe concordance between these findings and previous observational studies supports that insomnia is potentially causally associated with the risk of sepsis. Thus, insomnia is a potential preventable risk factor of sepsis that should be further investigated, also in non-European populations.