It hits at 3 a.m. Your calf locks into a hard knot, your toes curl, and all you can do is grab your leg and wait.
If that sounds familiar, you have plenty of company. Night leg cramps are one of the most common reasons people go looking for a natural fix, and muscle twitches (that flicker in your eyelid or thumb that won’t quit) aren’t far behind.
The good news: most cramps and twitches are harmless, and there are simple, old-fashioned things people try first. Here’s what they reach for, what the research says, and the signs that mean it’s time to get checked.
Quick take
- Most cramps and twitches are harmless, and are often linked to tired muscles, sweating, dehydration, low minerals, stress, caffeine or certain medicines.
- Magnesium, potassium-rich foods, a bedtime calf stretch and even a sip of pickle juice are the things people try first.
- Cramps with calf swelling, weakness, muscle shrinking or dark urine need a doctor, not a home remedy.
Why muscles cramp and twitch
A cramp is a muscle that tightens on its own and won’t let go. It can last a few seconds or several painful minutes, and the calf, the foot and the back of the thigh are the usual spots.
A twitch is smaller: a quick flicker under the skin, often in an eyelid, a thumb or a calf. Doctors call these fasciculations, and in healthy people they tend to come and go.
The situations that bring people to this topic are pretty familiar:
- Night cramps, especially after 50 and in pregnancy
- Hard workouts or hot days, when you’ve sweated a lot
- Long hours on your feet, or sitting with your legs folded
- Stress, poor sleep and lots of coffee, the classic trio behind an eyelid twitch
- Certain medicines, such as water pills (diuretics) and statins, which list cramps as a possible side effect
- Low minerals, from a diet light on vegetables, nuts and seeds, or from vomiting or diarrhea
Often there’s no single cause. That’s why people tend to try a few gentle things at once.
Magnesium: the mineral people look at first

Magnesium helps muscles relax after they contract, so it’s the first thing many people reach for when cramps start waking them up. Plenty of people find it helps, and naturopaths often suggest it alongside a stretch routine.
The research is mixed. A 2020 Cochrane review found magnesium probably doesn’t make much difference for typical night cramps in older adults, and the results in pregnancy were unclear. Some people still feel better on it, especially if their diet runs low, so it’s worth knowing how to do it sensibly.
Food first. Pumpkin seeds, almonds, cashews, spinach, black beans, oats and dark chocolate are all good sources.
How much: in the US, the NIH Office of Dietary Supplements sets the daily target at 400–420 mg for men and 310–320 mg for women, and the upper limit for magnesium from supplements at 350 mg a day for adults (food doesn’t count toward that limit). Canada uses the same values. Glycinate forms are usually gentler on the gut than oxide or citrate. Check with your doctor first, and read our guide to magnesium types if you’re choosing one.
Go easy if: you have kidney disease (skip it unless your doctor says otherwise), it gives you loose stools, or you take certain antibiotics or bone medicines (bisphosphonates), which need to be spaced a few hours away from magnesium.
Also available: a magnesium glycinate option
If you’d like to try a glycinate form, Magnesium Glycinate Lysinate is one we like, sold by an outside company. It’s a mineral supplement, not a cramp medicine, so it may suit people whose diets run low in magnesium. Check the label amount against the limits above, skip it if you have kidney disease, and ask your doctor or pharmacist first if you take other medicines.
Sponsored link. If you buy through it, Clif may earn a commission at no extra cost to you. The claims on the seller’s page are theirs, not ours, and haven’t been checked by us. It’s not a substitute for seeing your doctor.
Potassium, sodium and the sweat factor

Muscles and nerves run on electrolytes: potassium, sodium, calcium and magnesium working together. When you sweat hard, or lose fluid through vomiting or diarrhea, that balance can tip, and cramps are one way the body lets you know.
Potassium from food. Beans, lentils, potatoes, squash, spinach, bananas, avocados and dried apricots are the easy wins. In the US, the National Academies set the adequate intake at 3,400 mg a day for men and 2,600 mg for women; Canada uses the same values. Most people fall short, and food is the safe way to close the gap.
Skip potassium pills unless your doctor suggests them. Too much potassium can upset heart rhythm, especially with kidney disease or with blood pressure medicines like ACE inhibitors, ARBs or potassium-sparing water pills. Salt substitutes are often potassium chloride, so the same caution applies. (Our blood pressure post has more on the sodium and potassium balance.)
Sweaty days. For long, hot workouts or physical jobs, drinking water steadily and adding an electrolyte drink, or a salty snack, is what many athletes do to keep cramps at bay.
Most cramps are a tired, thirsty or under-fed muscle asking for a little care.
Pickle juice and other home tricks

Some of the most popular cramp tricks come straight from the kitchen and the locker room.
Pickle juice
A shot of pickle brine is a favourite with runners. In a small 2010 study, a sip of pickle juice eased induced cramps faster than water. Interestingly, it seemed to work too quickly to be about salt, so researchers think a reflex triggered by the sour taste may help the muscle let go. About 1–3 tablespoons is the amount people usually try; it’s salty, so go easy if you watch your sodium.
The bedtime calf stretch
Stand facing a wall, step one foot back, keep that heel down and lean in until you feel the calf stretch. Hold for 30 seconds, three times a side. A small trial in older adults found a nightly calf and hamstring stretch cut the number of night cramps. It costs nothing and it’s the first thing many physiotherapists suggest.
In the moment
- Flex your foot: pull your toes up toward your shin, or stand and press the heel down
- Massage the knot with firm, slow strokes
- Warmth (a warm bath or heating pad) for a tight muscle; cold for one that stays sore afterward
- Walk it off once it releases
For twitches
An eyelid or thumb twitch usually settles with more sleep, less caffeine and a little stress relief. Our sleep post covers the calming herbs and habits people use.
A word on tonic water and quinine
Quinine was once a common cramp remedy. The US FDA has warned against using quinine pills for leg cramps because of rare but serious blood and heart side effects, and Health Canada has issued similar warnings. The small amount in tonic water is a drink, not a dose, but it isn’t a cramp treatment either.
Who should go easy
- Kidney disease: avoid magnesium and potassium supplements unless your doctor recommends them.
- Heart or blood pressure medicines: ask before adding potassium, salt substitutes or magnesium.
- Pregnancy: leg cramps are common, but check with your midwife or doctor before any supplement.
- On a statin or water pill: new cramps are worth mentioning to your prescriber, rather than just stopping the medicine.
- High blood pressure: go easy on pickle juice and salty electrolyte drinks.
When to see a doctor
Most cramps are harmless. Get checked if you notice any of these:
- One calf that’s swollen, warm, red or tender, especially after a long trip or surgery. That can be a blood clot: get same-day care, or call 911 if you’re short of breath or have chest pain.
- Severe muscle pain with weakness and dark, cola-coloured urine after hard exercise or heat: go to an emergency department.
- Twitching with weakness, muscle shrinking, or trouble swallowing or speaking.
- Cramps that are frequent, severe, or getting worse, or that come with numbness or tingling.
- Cramps that started after a new medicine.
- Cramps with signs of dehydration you can’t fix by drinking: dizziness, very little urine, confusion.
Try this today
Tonight, before bed, do the wall calf stretch: 30 seconds, three times on each leg. Then add one magnesium-rich food to tomorrow’s plate, like a small handful of pumpkin seeds on your oatmeal or salad.
Go deeper in the Vault
Members can find the full Magnesium and Potassium and Electrolytes profiles in the Supplement Library, with typical amounts, forms and interactions in one place. Not a member yet? See what’s inside the Vault.
Educational only, not medical advice. This information has not been evaluated by the FDA or Health Canada and is not intended to diagnose, treat, cure, or prevent any disease. Talk to your healthcare provider before starting any remedy, supplement, or detox, especially if you are pregnant, nursing, taking medication, or managing a health condition. Read our full Medical Disclaimer.
