The most useful immediate remedy is to stretch the affected muscle.
When the calf cramps, straighten the knee and gently pull the toes towards the shin. This lengthens the contracted muscle and can help it relax. If standing is safe, placing the foot flat on the floor and leaning forward against a wall may provide a similar stretch.
Gentle massage can help ease discomfort. Applying warmth, such as a warm towel or shower, may also relax the muscle after the acute pain begins to settle. Avoid forceful movements or sudden attempts to walk while the muscle is tightly contracted.
Painkillers such as paracetamol may help residual soreness, but they act too slowly to stop a cramp that is already occurring. Stretching is more useful during the episode.
Can Cramps be Prevented?
For people who experience frequent night-time cramps, regular calf and hamstring stretching is a reasonable first step. A simple routine before bedtime may help some individuals, although the evidence is not definitive.
A 2021 Cochrane review of non-drug treatments found that combined calf and hamstring stretching may reduce the severity of night-time cramps in older adults, but evidence for reducing their frequency was uncertain. Stretching is low-risk and practical, but it should not be presented as a guaranteed cure.
Adequate fluid intake is sensible, especially during hot weather or after exercise. People who lose substantial fluid through sweating may need appropriate fluid and electrolyte replacement. However, routinely drinking excessive water or taking electrolyte supplements without a clear need is not helpful and may sometimes be harmful.
The important principle is to correct genuine fluid or electrolyte loss rather than assume that every cramp represents a deficiency.
Should magnesium or other supplements be taken?
Magnesium is one of the most popular remedies for night-time cramps. Yet the evidence does not support routine supplementation for most adults with ordinary, unexplained cramps.
A 2023 clinical review in American Family Physician concluded that magnesium supplementation probably does not provide meaningful short-term relief for idiopathic nocturnal leg cramps. It may cause diarrhea and other gastrointestinal effects.
A randomized trial published in 2026 in Trials compared compression stockings, magnesium, and placebo in older adults. Compression stockings reduced cramp frequency, while magnesium did not significantly outperform placebo. This is an interesting finding, but further research is needed before compression stockings can be recommended routinely for everyone.

Quinine should not be used casually for leg cramps. Although it may reduce cramp frequency, it can cause serious adverse effects, including dangerously low platelet counts and heart rhythm problems. The UK Medicines and Healthcare products Regulatory Agency has advised against routine use and recommends considering it only in carefully selected cases when other measures fail.
When could a cramp signal something else?
Persistent or recurrent cramps may occasionally be associated with medical conditions such as diabetes, thyroid disorders, kidney disease, nerve compression or circulation problems. Certain medicines, including diuretics and some cholesterol-lowering drugs, may also contribute.
A doctor may review the medication list and order targeted tests when symptoms or examination findings suggest an underlying cause. Blood tests for electrolytes, glucose, kidney function or thyroid function are not necessary for every person with occasional cramps.
It is also important to distinguish cramps from other conditions. Restless legs syndrome causes an uncomfortable urge to move the legs, usually during rest, rather than a sudden painful muscle contraction.
A cramp accompanied by persistent swelling, redness, warmth or pain in one leg requires prompt assessment, particularly if a blood clot is possible. Severe muscle pain with weakness or dark urine after intense exercise also needs urgent medical attention.
The remedy is often simpler than expected
Most ordinary leg cramps settle with stretching, gentle movement and time. Regular stretching, sensible hydration and reviewing possible triggers may reduce recurrence. Supplements and medicines should not become the automatic response to every painful episode.
When cramps repeatedly disturb sleep, become more frequent or occur with other symptoms, the cause deserves attention. The goal is not merely to stop the muscle from tightening tonight, but to understand why it keeps happening.
