“Vitamin D is commonly prescribed for hypoparathyroidism [a condition that causes calcium deficiency, muscle cramps and spasms, weakness, and fatigue],” says Dr. Lukyanovsky. “Doctors might also prescribe it for osteomalacia, a condition where there's a depletion of calcium from the bone.”