Magnesium is an important metal element in the human body, and its content is behind only those of calcium, sodium, and potassium. It plays a key role in regulating many physiological functions, including glucose metabolism, protein synthesis, nucleic acid production, and muscle and nerve function [1]. However, a considerable portion of the US population (approximately 50%) has insufficient magnesium intake [2]. The European Food Safety Authority (EFSA) recommends a daily magnesium intake of 350 mg for men and 300 mg for women [3].

Magnesium deficiency is associated with an increased risk of a wide range of diseases, including hypertension [4], diabetes [5], metabolic syndrome [6], coronary heart disease [7], and stroke [5]. Magnesium deficiency is also associated with an increased risk of mortality. In a meta-analysis of 19 prospective cohort studies by Bagheri et al., each 100 mg/day increase in dietary magnesium intake was associated with a 6% and 5% reduced risk of all-cause and cancer mortality, respectively [8]. However, the participants in the included studies were usually from the general population, and the association between magnesium intake and mortality in a stroke cohort has not yet been evaluated.

We hypothesized that magnesium intake would be inversely associated with the risk of all-cause mortality in patients with stroke. Therefore, the aim of the present study was to assess the relationship between magnesium intake and all-cause mortality in a nationally representative sample of adults with stroke in the United States (US).


Patient selection

We included data from the National Health and Nutrition Examination Survey (NHANES) survey cycles 2007–2008 to 2017–2018. The NHANES is a complex, multistage, probability sampling survey designed to assess the health and nutritional status of the non-institutionalized US population. The survey is conducted in two-year cycles by the Centers for Disease Control and Prevention (CDC) using in-person interviews, physical examinations, and laboratory tests. The study protocols were approved by the National Center for Health Statistics Ethics Review Board, and all participants signed the informed consent.

We identified stroke survivors aged ≥ 20 years based on their self-reported health conditions and medical history. Stroke survivors were those who answered yes to the question, “Has a doctor or other health professional ever told you that you had a stroke?” The question was asked, in the home, by trained interviewers using the Computer-Assisted Personal Interview (CAPI) system, which is programmed with built-in consistency checks to reduce data entry errors and also uses online help screens to assist interviewers in defining key terms used in the questionnaire. When unusual, inconsistent, or unrealistic responses were recorded, the interviewer was alerted immediately and instructed to verify or edit the initial response. Participants with missing data regarding magnesium intakes, mortality, or key covariates were excluded.

The process of study subject selection is shown in Fig. 1. A total of 1398 stroke survivors were identified in six cycles of NHANES, 2007–2008 to 2017–2018. Then, we excluded 192 participants with missing dietary or dietary supplement magnesium intake data, 287 participants with missing covariates data, and two participants with missing follow-up data. Finally, 917 stroke survivors were included in this study to analyze magnesium intake and mortality.

Fig. 1
figure 1

Flow chart of patient selection in this study

Data collection

Information on dietary magnesium, other nutrients, and energy intakes were obtained from 24-hour dietary recall interviews. Participants were interviewed to the first dietary recall in-person in the mobile examination center (MEC), and the second interview was collected by telephone 3 to 10 days later. The types and amounts of foods, beverages, and water consumed during the 24-hour period prior to the interview were inquired to derive the dietary intake data. Dietary intakes of magnesium, sodium, potassium, calcium, fiber, and polyunsaturated fatty acids (PUFA) were averaged over the two recall periods. When only the first recall was available, this value was used instead of the average value. Furthermore, information on dietary supplement intakes were assessed by personal interview. The types and amounts of dietary supplements and antacids consumed during the 30-day period prior to the interview were inquired to derive a mean daily intake data. The total magnesium intake was calculated by summing the magnesium intake from diet and supplements, and then adjusting for total energy intake according to the nutrient density method [9].

Sociodemographic characteristics, including age, sex, race, education level, and ratio of family income to poverty (PIR) were obtained from self-reports. Body mass index (BMI) was calculated as weight in kilograms divided by height in meters squared. Vascular risk factors, including hypertension, diabetes, hyperlipidemia, coronary heart disease, congestive heart failure, smoking history, and drinking history were determined by self-reports and medical examination data. Hypertension was defined as self-reported high blood pressure, systolic blood pressure ≥ 140 mmHg, or diastolic blood pressure ≥ 90 mmHg. Diabetes was defined as self-reported diagnosis, fasting blood glucose ≥ 7.0 mmol/L, or hemoglobin A1c ≥ 6.5%. Hyperlipidemia was defined as self-reported high cholesterol level or total cholesterol ≥ 5.17 mmol/L. Coronary heart disease and congestive heart failure were defined as self-reported diagnosis. Smoking history was defined as smoking at least 100 cigarettes ever. Drinking history was defined as the consumption of at least 12 drinks of any one year.


The primary outcome measure was all-cause mortality. Mortality status was determined by using a probabilistic match between NHANES and the National Death Index (NDI) death certificate records [10]. The primary identifiers used in the linkages were: Social Security Number, first name, middle initial, last name or father’s surname, month of birth, day of birth, year of birth, state of birth, state of residence, race, and sex. A probability cutoff of 0.99 was selected for matches to have the lowest linkage errors (2%) possible. The follow-up time was determined as the period from the first dietary recall interviews date to the date of death or end of follow-up (December 31, 2019).

Statistical analysis

The weighted median and interquartile range were used to present continuous variables, and the unweighted frequency and unweighted percentage were used to present categorical variables. The Wilcoxon rank-sum test for complex survey samples and the chi-squared test with Rao and Scott’s second-order correction were used to compare intergroup differences in continuous and categorical variables, respectively. The total magnesium intake was divided into quartile groups (Q1, Q2, Q3, and Q4). Kaplan–Meier curves were generated and compared among the total magnesium intake quartile groups.

Cox regression analysis was performed to examine the association between total magnesium intake and all-cause mortality. Four multivariable Cox regression models were evaluated: Model 1 was adjusted for age, sex, and race; Model 2 was adjusted for sociodemographic characteristics and lifestyles; Model 3 was adjusted for all variables in Model 2 plus dietary factors; Model 4 was adjusted for all variables in Model 3 and past medical history. A restricted cubic splines regression model with four knots (5th, 35th, 65th, and 95th percentiles) was used to examine the possibility of the non-linear association between total magnesium intake and all-cause mortality. Stratified analyses according to age, sex, and other variables were conducted and adjusted for the variables included in Model 4. Interaction analysis between total magnesium intake and each stratified variable was also tested. All statistical tests were two-tailed, and p < 0.05 was considered statistically significant. Statistical analyses were performed using the R version 4.2.1 (R Foundation for Statistical Computing, Vienna, Austria).


There were no notable differences in most aspects between all NHANES stroke survivors and those with complete information needed to be included in this analysis; the exceptions were that those included in the analysis were younger and had longer follow-up time and lower proportion of death (Supplementary Table 1).

Patient characteristics

The average age of the stroke patients was 67.0 years, and 50.2% were women, of whom 8.1% were Mexican American, 6.1% other Hispanic, 51.7% White, 27.3% Black, and 6.9% other races and ethnicities. There were 277 deaths (30.2%) in this stroke survivor cohort over a median follow-up time of 5.3 (2.8–8.6) years. The average total magnesium intake across all patients was 251.0 (184.5–336.5) mg/d. According to EFSA recommended standard, 321 (70.2%) males and 339 (73.7%) females had insufficient magnesium intake. After considering energy intake, the average total magnesium intake was 14.5 (12.0–18.4) mg/(100 kcal*d). The quartiles of total magnesium intake levels were Q1 (≤ 12.0 mg/(100 kcal*d)), Q2 (12.1–14.5 mg/(100 kcal*d)), Q3 (14.6–18.4 mg/(100 kcal*d)), and Q4 (≥ 18.5 mg/(100 kcal*d)). Compared with survivors, those who died during follow-up were older, had higher PIR, serum creatinine, and total potassium and calcium intakes levels, had a higher proportion of hypertension, congestive heart failure, and coronary heart disease, and had lower BMI and total energy intake levels (all p < 0.05, Table 1).

Table 1 Clinical characteristics of patients

Total magnesium intake and all-cause mortality

In the univariate analysis, there was no notable difference of total magnesium intake between patients who died and those who survived (15.2 vs. 14.3 mg/(100 kcal*d), p = 0.20, Table 1). However, in any multivariate model that adjusted for potential confounders, total magnesium intake levels had an independent inverse association with all-cause mortality risk. After fully adjusting for potential confounding factors, each 1-mg/(100 kcal*d) increase in total magnesium intake was associated with a 3% reduced risk of all-cause mortality (HR, 0.97; 95% CI, 0.94–1.00; p = 0.017; Table 2). Patients in the fourth quartile of total magnesium intake showed a statistically significant decline in all-cause mortality risk compared to those in the first quartile (HR, 0.60; 95% CI, 0.38–0.94; p = 0.024). In the multivariable-adjusted Kaplan–Meier curves, a substantially lower risk of death was observed among patients with the highest quartile of total magnesium intake (Fig. 2). The multivariable-adjusted spline regression model further confirmed that the inverse association between total magnesium intake and all-cause mortality risk was linear (p-nonlinear = 0.69, Fig. 3). Stratified analyses showed that the statistically significant association between total magnesium intake and all-cause mortality was observed in patients who were older, female, without hypertension, and had smoking, normal renal function, and adequate energy intake (Table 3). The multivariable Cox regression model showed that total sodium, potassium, and calcium intakes were not related to all-cause mortality risk (Supplementary Table 2).

Table 2 Cox regression analysis to identify the association between total magnesium intake and all-cause mortality
Fig. 2
figure 2

The Kaplan–Meier curve for the study participants with different total magnesium intake. The curve was adjusted for the same confounding variables as in Model 4

Fig. 3
figure 3

Restricted cubic spline regression model of the relationship between total magnesium intake and risk of all-cause mortality after stroke. The model was adjusted for the same confounding variables as in Model 4. CI, confidence interval; HR, hazard ratio

Table 3 Stratified analyses to identify variables that may modify the association between total magnesium intake (per 1-mg/(100 kcal*d) increase) and all-cause mortality

Dietary magnesium intake and all-cause mortality

Among the included stroke patients, only approximately one-third of participants (276/917) had magnesium intake from dietary supplements. Thus, we additionally analyzed the relationship between dietary magnesium intake and all-cause mortality. The average dietary magnesium intake across all patients was 13.7 (11.5–16.8) mg/(100 kcal*d). Dietary magnesium intake was inversely associated with all-cause mortality risk in Models 1 and 2 (HR per 1-mg/(100 kcal*d) increase, 0.95; 95% CI, 0.91–0.99; p = 0.012; Supplementary Table 3). However, when dietary factors or past medical history was considered, the above association became insignificant (HR per 1-mg/(100 kcal*d) increase, 0.96; 95% CI, 0.91–1.01; p = 0.13).


In this cohort study of nationally representative sample of stroke survivors, a linear inverse association was found between total magnesium intake and risk of all-cause mortality. All-cause mortality decreased by 40% during follow-ups after a median of 5.3 years in the participants with the highest quartiles of total magnesium intake (≥ 18.5 mg/(100 kcal*d)). Dietary magnesium intake alone was not related to all-cause mortality. No statistically significant associations were observed between dietary sodium, potassium, or calcium intake and all-cause mortality.

Insufficient magnesium intake was found in approximately three quarters of stroke survivors, indicating that magnesium deficiency is quite common. Almost 64–67% of the US adults consumed less than the recommended standard of magnesium from food in 2001–2002, and the estimate decreased to 53–56% in 2005–2006 [11]. Magnesium intake level was 31% below the dietary reference intakes in the French adult in 2006–2007, and the figure reduced to 19% in 2014–2015 [12]. Although magnesium consumption in the population is gradually increasing, it is still far below the reference level, particularly in patients with stroke.

The results on the association between magnesium intake and all-cause mortality are in line with previous findings that focused on community populations or cancer patients. In a nationally representative sample of US adults, adequate intake of magnesium was associated with reduced all-cause mortality during a median follow-up of 6.1 years [13]. Another study conducted in the Mediterranean adults with high cardiovascular risk in Spain reported that participants in the highest tertile of dietary magnesium intake had a 37% reduction in all-cause mortality risk compared to those in the lowest tertile [14]. Two studies conducted in Chinese community populations showed decreased all-cause mortality in the individuals with a higher dietary magnesium intake; however, this association depended on dietary quality and the ratio of calcium to magnesium intake [15, 16]. An inverse association between total magnesium intake and all-cause mortality has also been observed in patients with breast and colorectal cancers [17, 18]. Our study provides new evidence for this inverse association in the stroke population and confirms that this association is linear.

It is plausible that the beneficial effect of high magnesium intake on all-cause mortality in stroke survivors could be due to neuroprotective role of magnesium. A drawback of our study was that the serum magnesium concentration was not measured. A multicenter study revealed that acute ischemic stroke patients with the lowest serum magnesium levels (< 0.82mmol/L) had two-fold increase in the risk of in-hospital mortality [19]. Magnesium levels in cerebrospinal fluid were also lower in patients with acute ischemic stroke who died within seven days than in those who survived [20]. Magnesium has several crucial roles in neuroprotection, including blockade of N-methyl D-aspartate (NMDA) receptor–mediated excitotoxic injury, calcium antagonism, vasodilatation, and antiplatelet effect [21]. The protective effect of magnesium was particularly evident in some subgroups of stroke patients, such as the elderly and those who smoked. Aging [22] and smoking [23] are associated with elevated levels of inflammation in the human body. Magnesium has anti-inflammatory effects and magnesium intake is inversely associated with serum C-reactive protein and interleukin-6 levels [24, 25]. Thus, ensuring sufficient magnesium intake is important for these subgroups. Total energy intake exceeding 2000 kcal per day ensures sufficient daily magnesium intake.

Total calcium intake independent of magnesium intake was not associated with all-cause mortality. Some studies have reported an association between calcium intake and all-cause mortality; however, most have not considered magnesium intake [26]. Calcium is essential for intracellular signalling, cardiac and vascular smooth muscle contraction, and coagulation pathway, but high levels may also contribute to atheromatous plaques [27].

Some limitations should be acknowledged in our study. First, the participants of this study were stroke survivors rather than acute stroke patients. The length of time from stroke onset to the first dietary recall interviews was unclear. Second, the diagnosis of stroke was determined by participants’ self-reports, which might introduce a false reporting. The survey questionnaire also did not distinguish between ischemic and hemorrhagic stroke. Third, serum magnesium concentration was not measured in this study. It is unclear whether the impact of total magnesium intake on all-cause mortality is mediated by serum magnesium levels. Fourth, some important confounding variables (e.g., stroke severity and adherence to secondary prevention of stroke) that might influence mortality were not available. Fifth, subgroup analysis was exploratory and the results need to be validated in an independent cohort.


In conclusion, we found that magnesium intake is inversely associated with the risk of all-cause mortality in stroke survivors, especially total magnesium intake. Considering that insufficient magnesium intake is common in stroke patients, improving magnesium intake in stroke survivors is warranted. Further randomized control trials are needed to explore whether increasing dietary and dietary supplement magnesium intake can reduce the risk of death after stroke.