There are a LOT of links in that article about Magnesium, showing the relation of magnesium to calcium.
One says that one needs about twice the magnesium to calcium ratio, for calcium to enter the bones. Otherwise it gets into soft tissue, building that painful prickly feeling in the heel, for instance.
We learned this, and my wive's calcium deposits in her feet actually dissolved by adding magnesium, and the pain went away.