Abstract
BACKGROUND: Recent studies have suggested potential effects on magnesium homeostasis associated with sodium-glucose cotransporter 2 (SGLT2) inhibitors and glucagon-like peptide-1 receptor agonists (GLP-1 RA). We sought to determine whether these effects lead to a reduced risk of hypomagnesemia among adults with type 2 diabetes in clinical practice. METHODS AND FINDINGS: We conducted a target trial emulation study using the multi-institutional cohort data from the TriNetX Global Collaborative Network. We compared 1:1 propensity score-matched patients with type 2 diabetes newly initiating SGLT2 inhibitors versus dipeptidyl peptidase-4 (DPP4) inhibitors (n = 718,798), GLP-1 RAs versus DPP4 inhibitors (n = 623,390), and SGLT2 inhibitors versus GLP-1 RAs (n = 702,808) from 2016 to 2024. Propensity scores were estimated using logistic regression models that included baseline covariates such as age, sex, race, comorbidities, and medication and laboratory data. In each comparison, patients receiving DPP4 inhibitors were considered the active-comparator group. The primary outcome was incident hypomagnesemia, defined by clinical diagnosis or serum magnesium <1.80 mg/dL. Patients were followed until the occurrence of an outcome of interest, last clinical visit, death, or the end of database period (March 31, 2025), whichever came first. We found that initiation of SGLT2 inhibitors was associated with a significantly lower risk of hypomagnesemia, compared with both DPP4 inhibitors (Hazard ratio [HR]: 0.80, 95% confidence interval [CI]: 0.79, 0.82; p < 0.05) and GLP-1 RAs (HR: 0.92; 95% CI: 0.91, 0.93; p < 0.05). Similarly, GLP-1 RA use was associated with a lower risk of hypomagnesemia, compared with DPP4 inhibitors (HR: 0.89; 95% CI: 0.88, 0.91; p < 0.05). These associations were consistent across individual agents within each drug class. The main limitation of our study is that residual confounding inherent to retrospective observational research cannot be completely ruled out. CONCLUSIONS: Treatment with SGLT2 inhibitors and GLP-1 RAs was associated with a lower risk of hypomagnesemia, compared with DPP4 inhibitors. These findings suggest that SGLT2 inhibitors and GLP-1 RAs may be preferable options for patients at risk of hypomagnesemia.