Nighttime leg pain is remarkably common, affecting roughly 30% of adults at least five times per month. The most likely causes range from simple muscle cramps and daytime inactivity to circulatory problems and nerve damage, and figuring out which one applies to you depends on what the pain actually feels like.
Muscle Cramps: The Most Common Culprit
Nocturnal leg cramps are sudden, painful contractions that strike mostly in the calf. They can last anywhere from a few seconds to several minutes, and they often wake you from sleep. Unlike other causes of nighttime leg pain, cramps produce a hard, visible knot in the muscle that you can sometimes feel with your hand. About 6% of adults experience them on 15 or more nights per month, severe enough to regularly disrupt sleep.
Two factors strongly linked to nighttime cramps are reduced flexibility and weak toe muscles. One study found that greater whole-body flexibility was associated with 31% lower odds of nighttime cramps, and people who passed basic toe-strength tests had 50% lower odds. This helps explain why people who sit most of the day, allowing their calf muscles and tendons to stay shortened for hours, tend to cramp more at night. Aging compounds the problem because tendons naturally shorten over time.
Restless Legs Syndrome Feels Different
Restless legs syndrome (RLS) is easy to confuse with cramps, but the sensation is distinct. Rather than a painful contraction, RLS produces an uncomfortable urge to move your legs that shows up when you’re at rest, particularly in the evening and at night. People describe it as crawling, tingling, or an itch deep inside the leg that only improves when you get up and walk around. There’s no visible muscle knot, and the discomfort is more restless than sharp. If your leg pain eases with movement rather than stretching, RLS is worth considering.
Poor Circulation and Vein Problems
Two circulatory conditions cause leg pain that worsens specifically at night, and they work in opposite directions.
Peripheral artery disease (PAD) happens when narrowed arteries can’t deliver enough blood to your legs. During the day, gravity helps push blood downward. When you lie flat, that gravitational assist disappears, and blood flow to your feet and toes drops further. In advanced cases, this produces a burning or aching pain in the forefoot or toes that wakes you at night. People with PAD often discover that dangling their legs over the side of the bed or standing up briefly relieves the pain, because gravity restores some blood flow.
Chronic venous insufficiency (CVI) is essentially the reverse problem. Damaged valves in your leg veins fail to push blood back up toward your heart, so blood pools in your lower legs throughout the day. The result is aching, heavy, tired-feeling legs that tend to be worst at the end of the day and into the evening. Swelling around the ankles is a hallmark sign, especially after prolonged standing. While CVI pain often improves once you elevate your legs, the accumulated damage from a full day of pooling can leave your legs aching well into the night.
Nerve Damage and Neuropathy
Peripheral neuropathy, most commonly caused by diabetes, produces burning, tingling, or shooting pain in the feet and lower legs that is characteristically worse at night. The pain is typically moderate to severe and frequently disrupts sleep. Unlike cramps, neuropathic pain doesn’t come in sudden bursts. It’s more of a constant or semi-constant burning that intensifies when you’re lying still with fewer distractions. The exact reason nerve pain flares at night isn’t fully understood, but reduced sensory input during quiet rest likely plays a role: your brain has less competing information to process, so pain signals become more prominent.
If your nighttime leg pain feels like burning or electric shocks in your feet, especially if you have diabetes or prediabetes, neuropathy is a strong possibility.
Stretching Before Bed Helps
For cramp-related nighttime leg pain, the single most effective home strategy is stretching your calves and hamstrings right before sleep. A clinical trial in older adults found that six weeks of nightly stretching reduced cramp frequency by about 1.2 cramps per night and meaningfully reduced pain severity. The routine doesn’t need to be elaborate. A wall-supported calf stretch (leaning into a wall with one leg extended behind you, heel flat on the floor) held for 30 seconds on each side, combined with a seated hamstring stretch, is sufficient.
Magnesium supplements are widely recommended for leg cramps, but the evidence is mixed. Short courses under 60 days show little benefit. One well-designed trial found that 226 mg of magnesium oxide taken daily did significantly reduce cramp frequency after 60 days of consistent use, cutting weekly cramps from about 5.4 to 1.9. So magnesium may help, but it takes patience and shouldn’t be your only strategy.
Sleep Position and Pillow Placement
How you position your legs at night can make a noticeable difference. If you sleep on your back, placing a small pillow under your knees takes pressure off your lower back and gently elevates your calves, which helps with venous pooling. Side sleepers benefit from a pillow between the knees, which keeps the hips aligned and prevents the upper leg from pulling forward and twisting the lower body. For people with venous insufficiency, slight leg elevation can reduce the fluid buildup that contributes to nighttime aching.
If your pain worsens with elevation (a sign of arterial problems rather than venous ones), keeping your legs flat or even slightly lowered may be more comfortable.
Signs That Need Medical Attention
Most nighttime leg pain is benign, but certain combinations of symptoms point to something more serious. A leg that is swollen, red, and warm to the touch could signal a blood clot and needs immediate evaluation. A leg that appears pale or feels noticeably cooler than the other one suggests compromised arterial blood flow. Persistent burning or numbness in both feet warrants testing for neuropathy, particularly if you have risk factors like diabetes. And leg pain that consistently wakes you from sleep and doesn’t improve with stretching, position changes, or basic self-care over a few weeks is worth bringing to a doctor, even if none of the red-flag symptoms are present.