Leg cramps at night: causes, quick relief and prevention
- Night cramps are a common complaint with many possible causes, from tired muscles to medicines and illness.
- Stretching relieves a cramp: pull your toes towards you, or stand on the floor and walk a few steps.
- Vein disease is only one possible cause, so frequent cramps deserve a check-up with a doctor.
- Do not start magnesium or other 'anti-cramp' products without tests and medical advice.
- Calf pain with swelling and redness of one leg is a reason to call 103 straight away.
It is the middle of the night, you are fast asleep, and suddenly your calf feels as if it is being twisted into a tight knot. The muscle turns rock-hard, your toes curl downwards, and the pain makes it impossible to get comfortable or drift back to sleep. A minute or two later the spasm lets go, but the calf aches for a long time and you still feel it with every step the next morning.
Leg cramps at night are familiar to a great many people: athletes, those who have spent all day on their feet, pregnant women and older adults. Most of the time they are harmless, but sometimes they are a hint that your body needs some help. Let's look at where they come from, how to stop a cramp quickly and what helps prevent them.
What is a night cramp, and how is it different from other sensations?
A cramp is a sudden, involuntary and painful contraction of a muscle. At night it is usually the calf that cramps, less often the muscles of the foot or the back of the thigh. An episode lasts from a few seconds to several minutes; the muscle feels hard to the touch, and a dull soreness may linger afterwards.
It helps to tell cramps apart from other unpleasant leg sensations that disturb sleep:
- Restless legs syndrome is not pain but an uncomfortable urge to move your legs, which gets worse at rest and eases with movement. We explain it in detail in our article on restless legs syndrome and the veins.
- Heaviness, a bursting feeling and tiredness in the legs by evening are typical signs of venous insufficiency. They build up gradually rather than striking as a sharp spasm.
- Calf pain that comes on when walking and goes away after a short rest can be caused by poor blood flow in the arteries. That is a separate reason to see a doctor.
Why do legs cramp at night?
Night cramps do not have one single cause. Often a doctor cannot find a specific culprit at all, and the cramps are then called idiopathic. But some factors make them more likely:
- Tired, overworked muscles: a long day behind a market stall or in a shop, building work, an unfamiliar workout, a long walk in uncomfortable shoes.
- Too little movement and long hours of sitting, especially with your legs tucked under you or crossed.
- Age: muscles and tendons lose some of their elasticity over the years, and cramps become more frequent.
- Pregnancy, especially the second half.
- Heat and heavy sweating: in the summer heat you lose fluid and salts along with sweat.
- Some medicines, such as diuretics (water tablets). If cramps started after a new medicine, tell your doctor, but do not stop the treatment on your own.
- Health conditions: diabetes and nerve damage, kidney and thyroid disease, abnormal levels of potassium, calcium or magnesium in the blood, and diseases of the leg arteries and veins.
Can cramps be linked to your veins?
Yes, they can. Cramps, especially at night, are among the possible symptoms of chronic venous disease, along with heaviness, pain, swelling and a feeling of fullness. When the valves in your veins work poorly, blood pools in the legs and the calf muscles tire more by evening.
However, a cramp is a non-specific symptom. On its own it does not prove you have varicose veins, and people with varicose veins do not necessarily get cramps. A venous cause is more likely if you also have other signs: ankle swelling by evening, heaviness, visible enlarged veins or spider veins. You can read more about these symptoms in our article on heavy legs in the evening.
In that case your doctor may refer you for a duplex ultrasound scan of the leg veins. This painless test shows how well the valves are working and whether there are any clots in the veins.
What should you do when a cramp strikes?
The key is to stretch the tightened muscle gently. Stay calm and avoid sudden jerks:
- Sit up in bed, straighten your leg at the knee and pull your toes towards you, with your hand or with a towel looped around your foot.
- If you can, stand on the floor with your whole foot and shift your weight onto that leg. Walk slowly around the room.
- Massage the calf lightly from the bottom upwards until the muscle relaxes.
- Once the spasm has passed, put a warm towel on the calf or have a warm shower to ease the remaining soreness.
How can you prevent leg cramps at night?
There is no universal remedy, but simple habits help many people wake up in pain less often:
- Stretch before bed. Face a wall, rest your palms on it, step one foot back and, keeping the heel on the floor, feel the stretch in your calf. Hold for 20–30 seconds, then switch legs. The scientific evidence on stretching is mixed, but it is safe and many people find it helpful.
- Move during the day. Regular walking and heel raises strengthen the calf muscles and support blood flow. If you work at a desk, try these exercises you can do at your desk.
- Drink enough, especially in hot weather and after exercise. Tea at the dastarkhan counts too, but do not forget plain water.
- Cut down on alcohol, especially in the evening.
- Give your feet room at night. A heavy blanket tucked tightly at the foot of the bed pushes your toes downwards, making it easier for the calf muscle to cramp. Leave your feet a little space.
- Wear comfortable shoes with good foot support and a low, stable heel.
- If your doctor has recommended compression stockings because of vein disease, wear them during the day as advised. The compression class is chosen by a doctor, and compression is not suitable for some arterial diseases.
Do magnesium and other supplements help?
Many people buy magnesium, calcium or multivitamins straight after their first cramps. Yet there is little reliable evidence that supplements help ordinary night cramps in people who are not deficient. And if your electrolyte levels really are abnormal, the important thing is to find the cause rather than simply mask the symptom.
So the sensible approach is to have the tests your doctor recommends first, and only then discuss supplements or treatment. This matters especially with kidney or heart disease, where extra potassium or magnesium can do harm. During pregnancy, any medicine or supplement should only be taken on a doctor's advice.
When are cramps a reason to see a doctor?
Book an appointment with a GP if leg cramps at night keep coming back, disturb your sleep, started after a new medicine or come with other symptoms. If there are signs of vein disease you may be referred to a phlebologist, and for numbness or weakness, to a neurologist. Watch out for:
- cramps almost every night, or several times a night;
- muscle weakness, numbness, tingling or reduced sensation;
- swelling by evening, heaviness, visible enlarged veins;
- calf pain when walking that goes away at rest;
- strong thirst, frequent urination or noticeable weight loss without a reason.
The main points
Night cramps are unpleasant, but you can usually keep them in check: a stretch before bed, movement during the day, water in the heat and a little room for your feet under the blanket. If the spasms have become regular visitors, do not just put up with them. A calm conversation with your doctor can help find the cause and give you back a sound night's sleep.
Sources: 1. Lurie F, Passman M, Meisner M, et al. The 2020 update of the CEAP classification system and reporting standards. J Vasc Surg Venous Lymphat Disord. 2020;8(3):342–352. 2. De Maeseneer MG, Kakkos SK, Aherne T, et al. ESVS 2022 Clinical Practice Guidelines on the Management of Chronic Venous Disease of the Lower Limbs. Eur J Vasc Endovasc Surg. 2022;63(2):184–267.
Why do legs cramp at night in particular?
During sleep your muscles stay in one position for a long time and your feet are often pointed downwards, so the calf muscle is shortened and cramps more easily. Daytime tiredness and other risk factors add to this.
Are night cramps linked to varicose veins?
Sometimes: cramps are among the possible symptoms of chronic venous disease. But they have many causes, so a link with your veins can only be judged after an examination and, if needed, a vein ultrasound.
Should I take magnesium for calf cramps?
Do not start on your own. There is little convincing evidence that supplements help ordinary cramps, and they can be dangerous with kidney disease. Tests and a doctor's advice come first.
What should I do if my leg cramps while swimming?
Stay calm: roll onto your back, pull the toes of the cramped leg towards you and move steadily to the side using your arms. It is best to swim where other people are nearby.
Which doctor should I see about night cramps?
Start with a GP, who will assess your general health, order tests and, if needed, refer you to a phlebologist, neurologist or endocrinologist.