I’ve been on keto for three months. In the beginning, I would get terrible cramps in my calves when I was sleeping. I started eating more avocado and spinach, and the cramps seemed to subside. I got the worst cramps tonight after not having any for about a month or 2. The cramps I used to get would subside after like 10-20 seconds. This one hurt so bad I was crying out in pain. My boyfriend tried massaging my leg, but it wouldn’t let up for about 5 minutes. I did a 24hr fast that day. So I’m not sure if my fast contributed to the cramping or not? My leg is still sore, but I took some magnesium supplements, which seemed to help a bit.