Nighttime leg pain has several common causes, ranging from simple muscle cramps to circulation problems and nerve issues. What they share is a connection to what happens when you lie down: blood flow patterns shift, movement stops, and your brain has fewer distractions from pain signals. About 40 percent of adults over 50 experience nocturnal leg cramps alone, and the frequency increases with age.
Why Pain Gets Worse at Night
Your body processes pain differently when you’re lying still in a dark room. One well-supported explanation is called the gate control theory: nerves in your spinal cord act like gatekeepers, deciding how many pain signals reach your brain. During the day, movement and sensory input keep many of those gates partially closed. At night, the lack of stimulation opens the gates, letting more pain signals through. This is why a sore leg you barely noticed while walking around can become impossible to ignore once you’re in bed.
Your body’s natural pain-suppressing chemicals also follow a daily rhythm. During waking hours, your system produces more of these compounds, effectively raising your pain threshold. At night, production drops, and discomfort that was manageable earlier in the day can feel significantly more intense. Cooler bedroom temperatures can compound the effect, particularly for nerve-related pain.
Nocturnal Muscle Cramps
The most common cause of nighttime leg pain is a sudden, involuntary cramp, usually in the calf. These cramps can last from a few seconds to several minutes and may leave the muscle sore for hours afterward. They become more frequent with age, and despite how common they are, there is no single prevention method that’s been proven both safe and fully effective.
The causes are often mundane: spending long hours on your feet, not drinking enough water throughout the day, or holding an awkward leg position during sleep. Several medications are also known culprits. Diuretics (water pills), statins for cholesterol, certain antidepressants, sleep aids, and some pain relievers all list leg cramps as a side effect. Chemotherapy drugs can cause nerve damage that triggers cramps as well. If your nighttime cramps started or worsened after beginning a new medication, that connection is worth exploring with your prescriber.
When a cramp strikes, stretching the affected muscle provides the fastest relief. Flexing your foot upward (toes toward your shin) during a calf cramp can shorten the episode. As for prevention, the evidence on stretching before bed is mixed. One trial of adults over 55 found that nightly calf and hamstring stretches reduced cramp frequency by about one episode per night after six weeks. But other studies in older adults found no benefit from stretching three times daily over 12 weeks. Magnesium supplements are widely recommended, and magnesium does play a role in muscle and nerve function, but rigorous proof that supplementation prevents cramps is still lacking.
Restless Legs Syndrome
Restless legs syndrome (RLS) feels different from a cramp. Instead of a sharp, seizing pain, you feel an uncomfortable crawling, tingling, or pulling sensation deep in your legs, paired with an almost irresistible urge to move them. The hallmark of RLS is that symptoms start or worsen when you’re resting, particularly at night, and temporarily improve when you get up and walk around or stretch.
RLS is a neurological condition, not a muscle problem. It can run in families, and it’s more common in people with iron deficiency, pregnancy, or kidney disease. The key distinction from cramps is that moving brings relief. If you find yourself pacing the bedroom floor at 2 a.m. because your legs won’t settle, RLS is a likely explanation. Diagnosis is based entirely on your description of symptoms, with no blood test or imaging required, though your doctor may check your iron levels since low iron is a treatable trigger.
Poor Circulation and Artery Disease
Peripheral artery disease (PAD) occurs when fatty deposits narrow the arteries supplying your legs, reducing blood flow. In earlier stages, the pain typically shows up during walking and fades with rest. But in more advanced PAD, the pain comes even when you’re lying down or sleeping, because your narrowed arteries can’t deliver enough blood to meet even your muscles’ baseline needs.
Lying flat can make this worse. When you stand or sit, gravity helps push blood down to your legs. In bed, that gravitational assist disappears, and already-compromised arteries struggle to maintain adequate flow. People with severe PAD often find they need to hang their legs over the side of the bed or sleep in a recliner to get relief. Other signs include cool skin on the legs or feet, slow-healing sores on the toes, and noticeably weaker pulses in the feet. PAD is most common in smokers, people with diabetes, and those with high blood pressure or high cholesterol.
Venous Insufficiency
While artery disease involves blood having trouble getting to your legs, venous insufficiency is about blood having trouble getting back out. When the valves inside your leg veins weaken, blood pools in the lower legs, raising pressure in the smaller vessels and starving surrounding tissue of oxygen. This local oxygen deprivation triggers an inflammatory response: immune cells migrate to the area and release compounds that activate pain-sensing nerve fibers.
The pain tends to be a dull, aching heaviness rather than a sharp cramp. You might also notice swelling around the ankles that worsens as the day goes on, visible varicose veins, or skin changes near the ankles (darkening, thickening, or itching). Symptoms are often worst after a long day of standing or sitting, and while elevating your legs before bed can help, the underlying venous damage can still cause discomfort overnight.
Nerve Damage and Neuropathy
Damaged nerves can send pain signals even when nothing is physically wrong with the muscle or joint. Diabetic neuropathy is the most common form, typically starting in the feet and working upward. The pain is often described as burning, tingling, or electric, and it’s characteristically worse at night for several overlapping reasons.
First, the gate control mechanism plays a major role: without daytime movement to keep pain gates partially closed, nerve signals flood through more freely. Second, cooler nighttime temperatures worsen most types of neuropathic pain. Third, your body’s natural pain-suppressing rhythms are at their lowest point. These three factors stack on top of each other, which is why someone with neuropathy might function reasonably well during the day but struggle badly once they get into bed.
Neuropathy isn’t limited to diabetes. Alcohol use, vitamin B12 deficiency, thyroid problems, and chemotherapy can all damage peripheral nerves. The pattern of nighttime worsening is consistent across most of these causes.
Spinal Stenosis
Narrowing of the spinal canal in the lower back can compress nerves that run down into the legs, causing pain, heaviness, weakness, or cramping. This condition, called lumbar spinal stenosis, is most common in people over 60 and tends to cause symptoms during walking or standing that improve when you lean forward or sit down.
At night, lying flat can increase pressure on the compressed nerves, leading to leg cramps or aching that disrupts sleep. A simple position change often helps: pulling one or both knees toward your chest opens up space in the spinal canal and relieves pressure on the affected nerves. Sleeping on your side with a pillow between your knees can have a similar effect.
Figuring Out Your Pattern
Because so many conditions cause nighttime leg pain, paying attention to the specific character of your pain helps narrow things down. A sudden, intense contraction that locks your calf muscle for 30 seconds to a few minutes points toward cramps. A crawling, restless sensation that only improves with movement suggests RLS. Burning or tingling in the feet that gradually worsens over weeks or months is more consistent with neuropathy. Deep aching with visible swelling or varicose veins suggests a venous problem. And pain in the calves or feet that improves when you dangle your legs off the bed raises the possibility of arterial disease.
Also consider what changed recently. A new medication, a shift in activity level, weight gain, or a new diagnosis like diabetes can all introduce nighttime leg pain where there was none before. Keeping a brief log of when the pain occurs, what it feels like, what makes it better or worse, and any medications you’re taking gives you (and any clinician you see) a much clearer picture of what’s going on.