What type(s) of Mag do you take orally and how long have you been taking it?
Are you eating plenty of K (potassium) rich veggies to balance out the Na (sodium)?
The kidneys filter Magnesium, following the circadian rhythm and excreting the most at night. The kidneys can filter out anywhere from 1/2% to 70% of magnesium, depending on magnesium load in the body.
Since serum mag doesn't correlate well with tissue mag, I was thinking that a urine mag test may prove more reliable if you're retaining it. Something like the 24-hour collection of urine test might provide a better reference on retention: http://www.mayomedicallaboratories.com/test-catalog/print/8595
Also, Boron aids in Mag retention.
I'd simply try different Mag supps. if I were you, orally, and eat more Mag rich foods.