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 your… ... 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.


    1. Avatar
      Margaret-Ann Hanlon April 28, 2019 at 1:34 am

      I feel ya. I have tried everything with no luck. I go off keto for a week and no cramps. Back on it and within the week it starts. Mine usually hits around 4am. The more water I drink the worse the leg cramps. Someone has to have answers soon.


  4. Avatar

    Yes I only took 2 Keri ( ultra burn) and within hours I was having severe cramping in thighs


  5. Avatar

    I have struggled with cramping on keto. There can be no way a program is healthy if you need supplementation to stay healthy. I have tried magnesium (and doing 2 doses a day so that I am at about 150% of RDA), adding the morton salt that is part potassium, adding potassium, eat tons of leafy greens, home made broth with more salt added, tracking salt so that what I add to my foods is about 3000mg and then have more sprinkled on. I have tracked my cramps vs micro nutrients and there is no rhyme or reason. Nights I have more severe cramps, I might have had the most salt I have ever had. I am relatively healthy, not diabetic but middle aged and need to lose more weight. Low carb is the only program where appetite is managed and I don’t get hangry. SOMEONE please find a solution!


  6. Avatar
    Cheeky Carlson May 11, 2019 at 3:39 pm

    Try “Pedialyte” or “Liquid IV”
    I dissolve half a package in water and problem solved!


    1. Avatar

      How much Pedialyte were you drinking and how often?


  7. Avatar

    I suffered severe attacks of muscle cramps on ketogenic diet,i try baking soda ,too much water,added magnesium,potassium,the cramps more and more attacking my chest ,my shoulders,my back.i can not live like that,then,i add some fruits like berries,apricots,kiwi,i felt better .my advice to all ,they must eat two servings of low or moderate GI fruits to let your sever muscle cramps and insomnia disappear soon.


Leave a reply

Your email address will not be published.