One minute you are fast asleep, and the next you are half out of bed, gripping a calf that has turned to concrete and making a noise you hope the neighbours did not hear. Sixty seconds later it lets go, and you lie there wide awake, wondering what just happened.
If that scene sounds familiar, you have plenty of company, since up to 60 percent of adults report leg cramps at night, and they grow more common with age. They are also one of the most mythologized symptoms in medicine, with a banana, a supplement, or a family remedy offered for every one. This guide covers what a night cramp actually is, why the popular fixes mostly fail, what genuinely helps, and the signs that mean a doctor should take a look.
Key takeaways
Up to 60 percent of adults report night cramps, and they become more common with age.
A 2017 randomized trial found that magnesium oxide worked no better than a dummy pill for people with frequent night cramps.
Quinine pills carry a risk of rare but serious reactions, and tonic water contains far too little quinine to help.
Stretching the cramping muscle firmly is the fastest way to end a cramp, and nightly stretching is a low-risk way to try preventing them.
Diuretics and long-acting inhalers are among the medications most often linked to new cramps, so a medication review is worth asking for.
What is a charley horse actually doing to your calf?
A charley horse is a sudden, involuntary tightening of a muscle, usually in the calf or the small muscles of the foot, that lasts anywhere from a few seconds to several minutes. The muscle visibly hardens, the pain is sharp, and the soreness can linger into the next day. Underneath the drama sits a kind of electrical misfire, in which the nerves that control the muscle keep firing when they should be resting.
What sets off that misfire is still not well understood, and in most people no underlying cause is ever found. Doctors call that idiopathic, which simply means the cause is unknown. Researchers do know that the cramps are slightly more common in women and become more frequent with age.
One Canadian finding is stranger than the rest. A study of seasonal patterns published in the CMAJ, which used British Columbia prescription records and internet search data, found that night cramps peak in midsummer at roughly twice their midwinter level. That result undercuts the popular idea that cold weather is the main trigger.
Does magnesium for leg cramps actually work?
Magnesium is the most popular answer out there, and the evidence is bluntly unimpressive. In a randomized trial published in JAMA Internal Medicine in 2017, 94 adults with frequent night cramps took either magnesium oxide or a dummy pill every night for four weeks. Cramps dropped from about eight a week to four or five in both groups, so magnesium did no better than the placebo.
Earlier trials of other forms of magnesium in older adults found no clear benefit either. Bananas fare no better, since there is little evidence that low potassium drives ordinary night cramps in otherwise healthy people. Magnesium for leg cramps is unlikely to hurt most people, though the bottle on your nightstand is probably not the reason a good week went well. Our guide to what a magnesium supplement actually does sorts the real uses from the marketing.
Is tonic water worth a try?
Tonic water is the one remedy with a kernel of truth and a real warning attached. Its bitter ingredient, quinine, has shown a modest benefit against cramps in trials. A bottle of tonic water holds only a trace, no more than 83 mg in a whole litre, which is a small fraction of a medicinal dose and far too little to make a difference.
Quinine pills are a different story, because they can trigger rare but serious reactions, including dangerous drops in blood platelets and clotting in the body's smallest blood vessels. By 2010, Health Canada had received 71 reports of serious adverse reactions suspected to be linked to quinine, and it has not approved the drug for leg cramps. A CMAJ commentary on quinine for night cramps concluded that it should not be used routinely. No product on the pharmacy shelf reliably fixes cramps overnight.
Why do home remedies seem to work for a while?
Part of the reason is that cramps arrive suddenly, hurt a great deal, and then vanish completely, which makes them perfect for false lessons. Whatever you did yesterday must be why tonight was bad, and whatever you tried last week must be why this week was calm. Cramps also come and go in streaks on their own, so a remedy started during a bad stretch gets the credit when the streak ends.
The magnesium trial shows this in action, since the people taking dummy pills improved just as much as everyone else. Because the pain is real and the nights are long, people understandably keep reaching for home remedies with a good story attached, and the story often outlives the evidence.

Most popular cramp fixes fall short when tested, and stretching remains the safest thing to try.
How do you stop a calf cramp in the moment?
When a calf cramp hits, the move that works is the unglamorous one: stretch the cramping muscle firmly. Straighten your knee and pull your toes up toward your shin, or stand up and press your heel into the floor. Walking a few steps, massaging the muscle, and applying heat afterward can ease the soreness that follows.
If the cramp is in your foot, pull your toes back toward your ankle and hold the stretch until the muscle lets go. Most cramps release within a few minutes, and a steady stretch often helps them let go sooner.
Does stretching before bed actually prevent them?
For prevention, gentle calf and hamstring stretching before bed is the approach doctors most often suggest. The trial evidence is mixed, with one study in older adults finding fewer and milder cramps and another finding no clear effect. It costs nothing and carries almost no risk, which is more than most of the alternatives can say.
A few other low-risk habits are worth trying alongside it. Avoid sitting or standing in one position for long stretches during the day, keep the covers loose at the foot of the bed so your toes are not pointed all night, and stay reasonably active. Folding a short stretch into your evening routine also fits neatly with the missing step in a good night's sleep.
Which medications that cause leg cramps should you ask about?
The practical lead worth chasing before any supplement is your prescription list. A large study of 4.2 million British Columbia residents found that new treatment for cramps often followed soon after people started certain drugs. The clearest links were with diuretics, the water pills often used for blood pressure and swelling, and with long-acting inhalers used for breathing problems.
Knowing the medications that cause leg cramps most often gives you a specific question to bring to your next appointment, and cramps sit alongside other medication side effects nobody warns you about. That does not mean you should ever stop medication on your own. If your cramps began or ramped up in the months after a prescription change, the timeline is worth mentioning, because a dose adjustment or a switch within the same drug family sometimes makes the cramps fade.
When should you see a doctor about night cramps?
Most leg cramps at night are harmless, though some patterns are worth a proper look. See a doctor if cramps are frequent enough to wreck your sleep, if they keep getting worse, or if they started around a new medication. Broken nights add up quickly, and our guides to why sleep can feel worse even when you get the same hours and still feel tired after a full night of sleep explain why.
Get checked promptly if the pain sits in one leg and comes with swelling, warmth, or redness, since a doctor needs to rule out a blood clot before anyone calls it a cramp. Leg pain that shows up when you walk and eases when you rest points to a circulation problem. Weakness, or numbness and tingling that can signal a nerve problem, also points away from simple night cramps.
A doctor will usually start with your history and a quick exam, which is often all that is needed. Blood tests for things like electrolytes, blood sugar, kidney function, and thyroid function make sense when something in that history points toward one of the small group of treatable causes. If the problem feels less like a painful seizing and more like a crawling urge to move your legs when you lie down, you may be dealing with something different. Our guide to legs that will not settle at night explains that condition and its own treatments.

Most night cramps need nothing more than a stretch, though these patterns deserve a proper look.
If cramps are costing you sleep, these steps give you a plan that goes beyond guesswork.
Stretch first. Pull your toes toward your shin the moment a cramp starts, and hold the stretch until the muscle lets go.
Build a bedtime stretch. Spend a few minutes on calf and hamstring stretches before bed for a few weeks, and see whether the cramps ease.
Write down your pattern. Note how often cramps happen, which leg is affected, and whether anything changed, such as a new medication.
Ask about your prescriptions. Bring a printable medication list with everything you take, including supplements, to a doctor or pharmacist and ask whether anything on it could play a part.
Skip quinine. Avoid quinine pills for cramps, and treat any product that promises an overnight fix with suspicion.
Frequently asked questions
Are night cramps a sign of something serious?
Most night cramps are harmless, and in most people no underlying cause is ever found. They deserve a doctor's visit when they are frequent, getting worse, or begin after a new medication. A swollen, warm, or red leg needs prompt attention, since that pattern can point to a blood clot instead of a cramp.
Why do cramps get worse as you get older?
Night cramps become more common with age, and researchers are still working out why. Older adults tend to lose muscle, spend more time sitting, and take more of the medications linked to cramps, such as diuretics. Staying active, stretching before bed, and asking for a medication review are the most practical steps you can take.
Does drinking more water stop night cramps?
Dehydration is a common explanation, though there is little evidence that it causes ordinary night cramps in healthy people. Drinking enough water is still sensible, especially in hot weather or after hard exercise. A large drink right before bed mostly means more trips to the bathroom, so spread your fluids through the day instead.
Why do cramps seem worse in the summer?
A Canadian study using British Columbia prescription records and internet searches found that night cramps peak in midsummer at roughly twice their midwinter level. Researchers do not yet know why, though the pattern suggests cold weather is not the main trigger. A bad July therefore does not necessarily mean something new is wrong.
How is a cramp different from legs that will not settle?
A cramp is a hard, painful tightening of a muscle that you can often see and feel. Legs that will not settle feel different, with a crawling or pulling urge to move that eases when you move and returns when you lie still. That pattern has its own causes and treatments, so describe it carefully to your doctor.
Should you keep taking magnesium if it seems to help?
Trials in older adults have found that magnesium works no better than a dummy pill for night cramps, and much of the improvement people notice happens on its own. Magnesium is generally safe at usual doses for people with healthy kidneys, though it can upset the stomach. Ask a doctor or pharmacist before combining it with other medications.
Can pregnancy cause leg cramps at night?
Leg cramps at night are common during pregnancy, especially in the second half. Gentle stretching before bed, staying active, and changing position often can help. Mention them at your next prenatal visit, and get checked right away if one leg becomes swollen, warm, or painful, since pregnancy raises the risk of blood clots.
Your next step
Most night cramps are harmless, though you do not have to keep wrestling your calf at 3 a.m. and guessing. The Medimap Health Hub has more on sleep and energy, and you can find a family practice near you or book a walk-in clinic visit to talk through your cramps and your medication list.
Disclaimer: This article is for general information only and is not medical advice. It does not replace a conversation with a doctor or other qualified health professional who knows your history. If you think you are having a medical emergency, call 911 or go to the nearest emergency department.
Find a specialist near you? Book with a doctor through Medimap — no referral needed.
Search clinics →
