A sudden calf spasm can turn a quiet night into painful minutes on the bedroom floor. Many people blame tired muscles, dehydration, or low magnesium, but a 2026 randomized trial points to another factor worth checking, especially in older adults.
Daytime compression stockings reduced weekly cramps and sleep interruptions more than placebo, while magnesium hydrochloride did not clearly prevent attacks.
That finding does not prove that poor circulation causes every night leg cramp. Most cases still have no single confirmed cause, and a cramp alone cannot diagnose a magnesium deficiency or vein disorder. Repeated episodes deserve a broader look at medications, fluid losses, nerve symptoms, muscle strain, and signs that blood or fluid is pooling in the legs.
What happens during a cramp
A nocturnal leg cramp is a sudden, involuntary, painful tightening of a muscle during rest or sleep. It often hits the calf, foot, or thigh and may leave soreness after the spasm ends. Stretching the affected muscle usually helps it release faster.
Why at night? Researchers still do not have one tidy answer. Muscle fatigue and altered nerve signals appear important, while pregnancy, heavy exercise, fluid loss, certain medicines, and some neurologic, metabolic, or vascular conditions can raise risk. Many episodes are labeled idiopathic, meaning no clear cause is found.
Compression beat the placebo
In the 2026 trial, Arno Kuusipalo and Juhani Laitila of Tampere University worked with a Finnish team linked to Tampere University Hospital and the University of Helsinki. Researchers randomized 121 adults ages 50 to 85 who had at least two cramps per week.
For four weeks, participants wore knee-high medical compression stockings, took a daily pill providing 250 mg. of elemental magnesium, or took a placebo.
At the start, participants reported a median of four cramps a week. By the end, the median was two in the stocking group and three in both pill groups, with the adjusted analysis showing about 1.4 fewer weekly cramps for stockings than placebo.
Nighttime awakenings also fell, while magnesium did not significantly reduce frequency or awakenings, although it modestly eased pain.
The authors described compression stockings as an option that “appears to be effective and plausible,” but the trial was small and treatment lasted only four weeks. Participants knew whether they wore stockings, symptoms were self-reported, and researchers did not objectively confirm every cramp.
Four people stopped using the stockings because of adverse reactions, although no serious adverse events were reported.

A medical illustration shows a painful calf muscle cramp at night, highlighting the sudden tightening and pain that can wake people from sleep.
Why circulation may matter
Leg veins must move blood back toward the heart against gravity. One-way valves and the calf muscle pump help, but inefficient venous return can let blood and fluid pool, causing heaviness, ankle swelling, itching, varicose veins, or aching late in the day. Graduated compression gently squeezes the leg to support that return and limit fluid buildup.
A 2023 venous study led by Raj Pyne reviewed 506 patients at one vein center. Among 214 people reporting nighttime cramps, 197 had abnormal backward blood flow in a superficial vein network along the outer leg.
Many treated patients reported relief, but the study involved people already seeking care for vein symptoms, so it cannot prove that venous disease causes cramps in everyone.
Together, the studies suggest circulation may be part of the picture for some people, especially when cramps come with heaviness, swelling, itching, or varicose veins. They do not show that everyone with night cramps has venous insufficiency. That distinction matters.
Magnesium deficiency is different
Magnesium helps nerves send signals and muscles contract and relax. The National Institutes of Health says early deficiency can cause fatigue and weakness, while severe deficiency can bring numbness, tingling, muscle cramps, seizures, and an abnormal heart rhythm.
Risk is higher with digestive disease, type-2 diabetes, long-term heavy alcohol use, chronic diarrhea, and some medicines.
Still, cramps alone are not enough to establish a deficiency. A separate 2026 population study found that magnesium supplementation did not prevent night cramps, and the higher cramp rate among users may simply mean people with symptoms were more likely to try it.
Supplements can cause diarrhea and interact with medicines, while reduced kidney function can make excess magnesium harder to clear.
What may help now
Gentle calf and foot stretching before bed may help, and stretching during a cramp often provides the fastest relief. Regular walking activates the calf pump, while adequate fluids make sense after heavy sweating, vomiting, diarrhea, or exercise in sticky summer heat. Avoiding long periods of sitting or standing without movement may also help tired, heavy legs.
The stockings used in the trial were medical-grade garments fitted to each participant. Strong compression is not a one-size-fits-all remedy, since it can be unsafe in severe peripheral arterial disease and requires caution with neuropathy, major swelling, skin damage, or serious heart failure. A clinician can check circulation and recommend the correct pressure and fit.
Seek urgent care for sudden one-sided swelling, color change, chest pain, breathing trouble, or severe persistent symptoms. Arrange a routine review when cramps repeatedly break sleep or arrive with weakness, numbness, muscle loss, or pain while walking.
The main study was published in the journal Trials.










