INTRODUCTION: Depression is a major global mental health challenge. Previous research suggests a link between magnesium consumption and depression, but the dose-response relationship remains unclear. This study investigates the relationship between dietary magnesium intake and depression risk among American adults. METHODS: Data from the 2005-2020 National Health and Nutrition Examination Survey (NHANES) were examined. Depression was measured with the Patient Health Questionnaire-9 (PHQ-9), and dietary magnesium consumption was calculated from two 24-h meal recalls. We used restricted cubic spline models, logistic regression, and sensitivity analyses to assess the connection. RESULTS: Among 35,252 participants (mean age: 49.5 ± 17.6 years
49.9% women), we observed a nonlinearity in the relationship between dietary magnesium intake and depression. Below the inflection point (366.7 mg/day), the odds ratio (OR) was 0.998 (95% CI: 0.997-0.999, CONCLUSION: A nonlinear dose-response relationship exists between dietary magnesium intake and depression risk among US adults. Age significantly moderates this association, suggesting dietary recommendations should be tailored to different age groups.