Yali Lai, Yi Zhou, Le Yang, Jierong Yin
Background: Epilepsy affects 1.2 % of the US population, with one-third of cases being drug-resistant. Magnesium modulates neuronal excitability, and dietary insufficiency may elevate seizure risk. Systemic inflammation, quantified by the Composite Dietary Antioxidant Index (CDAI), represents a plausible mediator, but population-level evidence remains limited. Objective: To investigate associations between dietary magnesium intake and epilepsy prevalence, assess CDAI-mediated pathways, and identify high-benefit subgroups. Methods: Cross-sectional analysis included 33,486 adults (≥20 years) from NHANES 2013-2018. Dietary magnesium intake was derived from two 24-hour recalls and analyzed continuously (per SD) and categorically (quartiles). Epilepsy was self-reported. CDAI integrated six micronutrient intakes. Weighted multivariable logistic regression evaluated magnesium-epilepsy associations, adjusted for sociodemographic, clinical, and dietary covariates. Mediation analysis quantified CDAI's role. Results: After full adjustment, each SD increase in magnesium intake was associated with 62 % lower epilepsy prevalence (OR = 0.38, 95 % CI: 0.21-0.70, p = 0.004). Quartile analysis revealed a significant inverse trend (p-trend = 0.032), with Q4 (highest intake) exhibiting the lowest risk (OR = 0.38, 95 % CI: 0.12-1.15). CDAI mediated 50.1 % of magnesium's protective effect (indirect effect: -0.478, 95 % CI: -1.031 to -0.166; p < 0.001). Stronger inverse associations occurred in Non-Hispanic Black (OR = 0.32, 95 % CI: 0.11-0.94) and Mexican American (OR = 0.35, 95 % CI: 0.16-0.76) individuals (p-interaction = 0.009) and those with obesity (OR = 0.26, 95 % CI: 0.10-0.68). Conclusion: Higher dietary magnesium intake is associated with significantly reduced epilepsy prevalence in US adults, with half of this effect mediated by attenuated inflammation (CDAI). Populations with elevated inflammation burdens or socioeconomic disadvantages may derive particular benefit. These findings support magnesium-rich diets as a potential preventive strategy and warrant prospective validation.