Very true, when your body is Acidic you may not be able to relax!
And if your muscles are not able to relax, then you may not be able to sleep peacefully!
Also it is True that enough Calcium and Magnesium may solve this problem!
But If you are too short of Calcium, no amount of magnesium may solve the problem completely!
A lot of times people may take extra Magnesium and help greatly with this problem, because the body may be short of this because of the Diet and many times it is because the person eats too much Protein and not enough Green Leafy vegetables, which are where Magnesium may come from in foods!