What causes muscle cramps on a ketogenic diet?

By Dr. Stephen Phinney and the Virta Team

Cramps may occur for a variety of reasons. A mineral imbalance may manifest in physical symptoms like cramps and is often resolved by magnesium supplementation. However, a balance of other minerals like sodium and potassium (electrolytes) along with adequate hydration could be contributors to cramping as well. In particular, a low sodium intake forces the kidneys to waste potassium, with in turn can make muscles more irritable and prone to cramping. This interrelationship among hydration, electrolytes, and minerals gets pretty complex, so we devoted a chapter to this topic in our book ‘The Art and Science of Low Carbohydrate Performance’.

Back to Keto FAQ

Related blog posts

Dr. Stephen Phinney on Nutritional Ketosis and Ketogenic Diets: Video Series- Dr. Stephen Phinney put together a three-part video series on ketogenic diets and nutritional ketosis. You'll learn the nutrition science… ... Read More
Ketone Supplements: The Pros and Cons- Ketone supplements rapidly and transiently increase blood concentrations of BOHB. On the surface, this seems like it should promote positive… ... Read More
Sarah Hallberg, DO, MS Reversing Diabetes 101 with Dr. Sarah Hallberg: The Truth About Carbs, Blood Sugar and Reversing Type 2 Diabetes- You may have heard a lot about type 2 diabetes – but do you know what it actually does to… ... Read More


  1. Avatar

    Thank you for this post! I had been getting SO MANY charlie horses and muscle cramps, especially at night when I was going to sleep. Sometimes I’d wake up in the middle of the night with a cramp! Added a magnesium supplement and it’s so much better!


  2. Avatar

    Does Virta recommend a particular type of magnesium supplement, or way of taking it which allows it to be absorbed effectively by the body?


    1. Virta Health

      You can find more information here on magnesium and what we use with our patients: https://blog.virtahealth.com/sodium-potassium-magnesium-ketogenic-diet/


  3. Avatar

    I was Keto from January to December and suffered from very bad cramps at night for most of that time. I’ve been taking powdered magnesium daily for years, but I added potassium tablets and upped my salt in an effort to stop them. No luck.

    In December I went off Keto for a month and a half and the cramps disappeared. Now a little over three months into Keto again and they’re coming back. I hope there’s a breakthrough in this area. The conventional remedies haven’t worked for me.


Leave a reply

Your email address will not be published.