I KNOW WHAT CAUSES IT!
This happened to me quite frequently, and I did a lot of research and experimentation and signs pointed to a mineral deficiency. In the end, for me, it turned out to be a potassium deficiency. So, whenever I forget to take my Vitamins, I have to supplement the multi-Vitamin with 400 mg of potassium gluconate to get myself "caught up" on the potassium. Works like a charm.
My Protein shake also has potassium, so when I am a good girl and take my vitamins and drink my shakes, I never get the cramps.
Hope this helps!