If you think you might be deficient in magnesium or calcium, make sure you top up on all of the sleepy vits: calc, magnesium, potassium, and Vit D. If you're low in any of these the others aren't going to be able to do their thing.