Mg belongs to the same family as calcium in the periodic table and is used by the body as a counterbalance for calcium. while Ca is very abundant in serum, it is found in much smaller concentration intra cellularly. In contrast, there is little Mg in serum and an abundance of Mg in the cell
See the rest here:
The effect of magnesium deficiency in gout and pseudogout