Everyone is aware of the osteoporosis epidemic in America, which comprises 8 million women and 2 million men over 50. Besides our love of refined grains and sugars and our relatively sedentary lives, which are bone weakening, it may come as a surprise that our obsession with calcium while ignoring magnesium may also play a big part. A study of 2000 70- to 79-year-olds found for every 100 milligrams (mg) of magnesium taken every day, their bone density increased 2 percent. 
Magnesium is in every cell and serves as a regulator, allowing in the proper amounts of calcium in and out.  Magnesium teams up with vitamin B6 to regulate the absorption of calcium into bone. Vitamin D and K are also part of the committee. This function is only one out of 300 that magnesium is known to do. In other words, without magnesium, calcium will not be absorbed into the bones.  Our bones contain more than half of our total body magnesium.
We are less aware that of about 34 million Americans who have low bone mass, some are as young as 30. We need an early start for later bone health, according to researchers at Yale University. The researchers gathered 120 girls aged 8 to 14 who were getting less than 220 mg of magnesium a day. The group was divided, with one-half getting a placebo and the other half getting 300 mg a day of magnesium for a year. [The recommended amount for these ages is 240 mg per day].
The ones getting magnesium increased their hipbone density significantly and had a small increase in the bone density of the lumbar spine. A few had mild diarrhea due to starting with the high dose right away. [4
Too much magnesium in supplements usually makes itself known by a bout of diarrhea. That means back off and only increase the amount slowly. The general recommendation is between 300 mg and 750 mg a day, depending on size, sex, age, and the recommendation of your health provider.
The safest way to get proper amounts of magnesium is through diet. Dark greens and spinach are highly recommended. In each chlorophyll molecule, there is an ion of magnesium. Japanese women have denser bones because they eat fermented soy products, such as miso, tempeh, and soy sauce. Whole grains, seeds, nuts, meat, fish, and almost everything except processed, refined foods have some magnesium.
Our modern health care system has brought us drugs that fight with or deplete magnesium. Sometimes both the drug and the magnesium are weakened, as in the case of antibiotics of the penicillamine and tetracycline families. Groups of drugs that deplete or increase elimination of magnesium include diuretics, corticosteroids, hormone replacement therapy, and oral contraceptives. Coffee and alcohol, two favorites, are also in this nefarious group. Finally, large doses of our bone friend calcium decrease the absorption of magnesium from the gut. 
The bisphosphonates, taken by many to offset osteoporosis, work by not allowing the bones to get rid of old bone cells. We have osteoblasts, the bone-building cells, and osteoclasts that take down and recycle old bone cells. Bisphosphonates disable the osteoclasts, so the old cells are left, making our bones denser and deader but not safer from fracture after three years.  Jaw necrosis, a rare, irreversible condition, is one of the side effects of bisphosphonates.
4. The Journal of Clinical Endocrinology & Metabolism Volume 91, Number 12, Pages 4866–4872 "A Randomized Controlled Study of Effects of Dietary Magnesium Oxide Supplementation on Bone Mineral Content in Healthy Girls" By T.O. Carpenter, M.C. DeLucia, J. Hongyuan Zhang, G. Bejnerowicz, L. Tartamella, J. Dziura, K. Falk Petersen, D. Befroy, and D. Cohen
6. Bottom Line's Prescription Alternatives, Earl I. Mindell, Ph.D., Virginia Hopkins, MA, Bottom Line Books, 2003