Actually magnesium relaxes muscles somewhat and this can promote drowsiness in some users of the supplement. Calcium can do the same. Take the supplement before bed as that effect only lasts a few hours.
Magnesium citrate supplements have been known to cause extreme drowsiness as a side effect. However this is a side effect that should be reported to your doctor.