Most people get enough magnesium from their diet, so talk to your doctor before taking magnesium supplements. About one-third of the magnesium in your body is on the surface of your bones.