Na(+)/Mg(2+) ion exchanger that acts as a predominant Mg(2+) efflux system at the plasma membrane (PubMed:18367447, PubMed:22031603, PubMed:23661805, PubMed:23976986). Transporter activity is driven by the inwardly directed electrochemical gradient for Na(+) ions, thus directly depends on the extracellular Na(+) ion concentration set by Na(+)/K(+) pump (PubMed:22031603, PubMed:23661805). Generates circadian cellular Mg(2+) fluxes that feed back to regulate clock-controlled gene expression and metabolism and facilitate higher energetic demands during the day (PubMed:27074515). Has a role in regulating the activity of ATP-dependent enzymes, including those operating in Krebs cycle and the electron transport chain (By similarity).