Magnesium deficiency. Take magnesium. Any form except magnesium oxide is ok. So magnesium taurate, glycinate, citrate, etc.
But you should also suspect leaky gut especially if you need, say, more than a couple hundred mg per day to stop the twitching. Or if your need for magnesium goes up considerably when you take folate or B12.