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. 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. 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/


Leave a reply

Your email address will not be published.