GO:0061768:   magnesium:sodium antiporter activity
Catalysis of the reaction: Na+(in) + Mg2+(out) = Na+(out) + Mg2+(in).