Legs Cramping At Night

So for the past 6 weeks or so, I’ve been having leg cramps at night while sleeping. Throughout the day when I’m just sitting, my calf muscles will “fire”. You can visibly see them moving and twitching. It’s weird. Aside from being annoying, they haven’t really been a problem until I was riding today and both legs starting cramping like crazy.

I’m not really sure what to do. I drink 80-100 ounces of water per day. My job isn’t strenuous in any way. I eat well, stretch, and am healthy overall.

Any suggestions? Has this happened to anyone else? If so, what helped?

Thanks in advance.


1 Like

Look into Restless Leg Syndrome (RLS). Symptoms you describe sound similar.
Diagnosis and treatment will require a sleep doctor.

1 Like

Thanks. My wife actually suffers from this from time to time and her legs never cramp. It’s more of a need to have to move your legs periodically.

Are you using any electrolytes when you are riding ?


Could be magnesium.

I eat a lot of pumpkin seeds for that. I tried supplements, they don’t work for me. They inflame my guts and i go the shitter right away, even a small amount will upset me (and then screws up also all the other stuff I should absorb).


Yessir. I’ll usually put 3 scoops of Tailwind Nutrition in one bottle and pure hydration (Kaged) in another. That’s for rides of 2-2.5 hours. Anything longer and I’ll bring another bottle or two worth of mix.

As in not enough magnesium? I’ll look into that.

Magnesium bisglycinate will solve that and increase absorbtion.

Cramping is pretty much hard to pin down as far as research goes. I’d recommend a blood test and see if you’re deficient in anything and start from there.

What I’ve personally seen is an increase in intensity or fatigue is likely the biggest cause, but I also know people that cramp a lot no matter what. Lots of podcast material on it with no definitive answer.

As a side note, a few buddies and myself have been experiencing an onset of cramps coupled with the ingestion of caffeine. There is research stating stimulants like caffeine increase firing of the muscle fibers and the “mind-muscle connection” which triggers cramping in some individuals. Just the other day, 2 hours into a 4x9 threshold session I slurped a SiS nootropic (200mg caffeine plus some other nootropics) and 5 minutes later both my hamstrings locked up. I was not overtly fatigued, but I found it concerning that 5 minutes after ingestion I cramped. Another friend stopped taking caffeine during rides, and hasn’t had a cramp since, including race efforts. Food for thought.


Since you asked whether this has happened to anyone else: yes, I believe I do get mild charley horses some nights—not strong enough to wake me up, but definitely strong enough to feel like “what the hell?!” the next day. It’s definitely different from restless legs, as you’ve noted. Since it’s in my calves (not quads) I’ve never attributed it to biking or really anything in particular, just general “bodies are weird.”

I do not cramp on the bike (other than side stitches) and wonder whether those cramps you experienced while riding are even related to the first kind. Could be two separate issues.

I get the same problem. Calf cramps up and in it’s full glory contracts my big toe (not fun to unlock it). Taking a magnesium supplement keep the cramp away. It doesn’t have to be every day, but most days. If I go a week without my legs start tensing up randomly at night in bed.

Be advised magnesium supplements can have a laxative effect, so start small. Calcium may blunt the laxative effect. I usually take 150-250mg before bed. I avoid magnesium oxide as the bioavailability isn’t great, Magnesium citrate is good, but many other mg chelates to chose from are fine just pricier.


Caffeine inhibits the absorption of magnesium.

So that might have something to do with it.

Those kind of cramps, yeah I’m not 100% sure… but they do seem to be exactly the same symptoms of magnesium deficiency, from how he describes them. They come from nowhere while he’s sleeping or relaxing, it would seem to indicate that. Of course, there are also other conditions, but given we cycle a lot and tend to deplete magnesium if we don’t take enough (or if you have too much caffeine throughout the whole day, which again, causes you to have a harder time absorbing magnesium), it would seem a quite high probability. And besides, pumpking seeds also give you a lot of other values you need, and they’re healthy… so there’s no harm in trying to eat those regularly and see if it improves your condition.

This is what 40g of pumpkin seeds will give you: (note, I increased my magnesium requirement, if it’s set as default it would be more around 60% of daily intake)

Having them from foods, in my case, is the best way. Well, I’d think for everybody, unless you’re allergic to certain foods.

As a sidenote, I don’t really care what 99% of the people do, I study food properties on my own. For example, b12 supplements too are rarely absorbed the same way as meat (unless you have some condition by which you cannot absorb it from food… i forgot what that condition is called…) (veganism lol? joking, forgot the name of that condition). My source for that is, I’m eating grass fed every day without taking any supplement, and my b12 has gone in roughly 6m from the 350 value to 700 (close to the max ‘‘recommended’’) and stayed there. There’s nothing else I’m eating that has b12, so I’m 100% sure it’s exactly from that meat. I have the history of all my blood tests logged digitally, so it’s more easy to notice certain differences.

Had also magnesium deficiency during 1st structured training year with similar symptoms. Initially tried supplements but later shifted to more pleasant dietary changes, esp dark chocolate and nuts. No issues since then.

1 Like

I can’t remember the last time I cramped on a bike (maybe 10 years ago at the end of the Marmotte :thinking:) but I’ve woken a few times with the calves cramping as described and no amount of stretching/ hydration seems to help and my job isn’t strenuous either and I think I eat good (Ive never seen a nutritionist though). For some reason it happens less often in winter.

@BigPoser there is some association between alcohol consumption and nocturnal leg cramps.

You might also try some of the OTC transdermal magnesium products for a few reasons. Number one, placebo…don’t harsh your placebo if it works. Number two, there is some evidence that local magnesium can alleviate nocturnal cramps. Number three, most OTC transdermal solutions use menthol to make the skin permeable (think PR lotion, caffeine shampoo) and there is some evidence that just local menthol treatment will alleviate nocturnal cramps. (you might even try just plain old biofreeze but biofreeze by itself might disturb sleep)

Re: just resting mucle ticks, I have had these all my life and never found a solution! :joy: Just last week I had a muscle tick in my left pectoral muscle that went on for three days. These are a total distraction and definitely disturb sleep. My sympathies.

1 Like

Same here, I also use cocoa nibs a bit, in addition to the pumpkin seeds (since I avoid sugar, mostly)

Good news here. It likely means you are probably getting a lot of intensity and gains your body hasn’t seen before. I remember those moments writhing on the floor of the living room and bedroom when I activated the muscle in a unique way.

This happened to me as well when I started hard group drop rides and after races. It’s generally disappeared now with corresponding improved fitness. I did start taking Magnesium Citrate gummies (with calcium) and make sure hot rides I have sufficient electrolytes in the bottle. (Skratch hyper)

Thank you all. I’ll certainly look into magnesium supplementation to see if that helps. It’s strange though because this is a new phenomenon. My calves would tick after long hard rides regularly, but not all day and never at night. And the ticks are visible.

I drink very little alcohol, I stay hydrated throughout the day, and get good sleep. Last week was a rest week in my plan and I was still experiencing the calf cramps at night. Although, last night I didn’t have any which was nice.

I’m not new to intensity. I’ve been racing many years and I’m preparing for next season already. I haven’t had any bloodwork done for about a year so I’m sure that might open a window as to what might be happening as well.


Try magnesium supplement and theragun after training.


I would try a percussive massager like a Theragun before bed on problem areas. Noticable difference for me. Calves, shins, quads and feet are areas that bug me from time to time and my Theragun helps.

1 Like