Did you take the magnesium also just before bed or morning?
I might have an absorption issue though. Magnesium salt topical spray (less costly than pills) helps intantly unclench my neck/shoulders, and theres extant literature on that being an effective method of administration.
I only take it when I feel a twinge in my calf. I figure I'm probably deficient in magnesium or something. Even if it is a placebo, it seems to work.