Objective: Diet is a modifiable factor that influences several chronic diseases, making lifelong dietary interventions critically important for reducing disease risk. Hence, this study aims to assess the potential causal relationship between diet and sleep apnea (SA). Methods: We analyzed genome-wide association study (GWAS) data from approximately 450,000 individuals, focusing on 8 dietary intakes and GWAS statistics for 249 metabolites from the UK Biobank. Sleep apnea-related phenotypic data from 16,761 participants were sourced from the FinnGen Biobank. Furthermore, we conducted a series of two-sample Mendelian Randomization (two-sample MR) to explore the causality between diet and SA. Sensitivity analyses were conducted to assess the robustness of the two-sample MR results, and reverse MR analysis was performed to examine potential reverse causality. Multivariate MR (MVMR) analysis and mediation effect estimation were employed to evaluate the mediating roles of metabolites. Results: Two-sample MR analyses revealed significant causal associations between bread intake (OR=0.56, 95% CI 0.35–0.89, P =0.014), cheese intake (OR=0.67, 95% CI 0.50–0.89, P =0.006), and dried fruit intake (OR=0.61, 95% CI 0.39–0.95, P =0.029) with SA. Reverse MR analysis indicated a causal effect of SA on dried fruit intake (P < 0.05). Univariate MR analyses further identified significant causal effects of bread and cheese intakes on 2 and 32 metabolites, respectively (P < 0.05). Subsequent MVMR analysis demonstrated direct causal effects of bread and cheese intake on SA, independent of metabolite mediation (P < 0.05). Furthermore, the mediating effect of cheese intake on SA through glucose was estimated at 0.023 (90% CI 0.01– 0.046), whereas other modeled mediation effects were not statistically significant. Conclusion: The MR analysis in this study offers genetic evidence indicating that heightened genetic susceptibility to cheese and bread intake potentially reduces SA risk. These findings underscore and validate the significance of diet in preventing SA.