"Magnesium deficiency
Magnesium deficiency is epidemic in the United States, with the majority of Americans unknowingly deficient. 9 13 This can be problematic when optimizing vitamin D levels. In fact, it is common for rising vitamin D levels to bring up symptoms of an underlying magnesium deficiency.
Vitamin D has no known side effects. If one experiences any of the following symptoms due to supplementing with vitamin D - or with sun exposure - a magnesium deficiency is most likely the reason why:
irritability or anxiety
nausea
headaches
insomnia
fatigue
muscle cramps/twitching
weakness
constipation"
Source : vitamin D council (
http://www.vitamindcouncil.org/about-vi ... magnesium/)