Why Are My Legs Hurting at Night? Causes & Relief

Nighttime leg pain is extremely common, affecting 50 to 60% of adults at some point. The most likely cause is nocturnal leg cramps, those sudden, involuntary muscle contractions that jolt you awake and leave your calf sore for hours. But leg pain at night can also stem from restless legs syndrome, nerve damage, circulation problems, or other underlying conditions. The type of pain you’re feeling, where it is, and how long it lasts all point toward different causes.

Nocturnal Leg Cramps

The most common culprit is a plain muscle cramp, usually in the calf. These cramps strike when you’re lying still or sleeping, and they can be intense enough to wake you up and leave soreness that lasts the rest of the night. Research from the American Academy of Family Physicians points to muscle fatigue and nerve dysfunction as the primary drivers, not the electrolyte imbalances many people assume.

One explanation is positional. When you’re lying in bed, your foot naturally points downward, which puts calf muscles in a shortened position. In that state, even a small burst of involuntary nerve firing can trigger a full cramp. This is why people who sit at desks all day and then go to bed without stretching are especially prone. Localized muscle fatigue from either too much activity or too little can set off the same process.

Your risk goes up with age, during pregnancy, and if you’re dehydrated. Certain medications can also contribute, including birth control pills, blood pressure drugs, and cholesterol-lowering statins. Kidney disease, diabetes, and thyroid disorders are all associated with more frequent night cramps.

Restless Legs Syndrome

Restless legs syndrome (RLS) feels fundamentally different from a cramp. Instead of a sharp, seizing pain, you feel an uncomfortable crawling or pulling sensation deep in your legs that creates an overwhelming urge to move them. Walking or stretching brings temporary relief, but the feeling returns as soon as you sit or lie down again.

The hallmarks of RLS are specific: symptoms start or worsen during rest, they improve with movement, and they’re worst in the evening and at night. RLS involves disrupted signaling in the brain’s dopamine pathways, which is why it responds to medications that increase dopamine activity. Low iron stores play a significant role. Specialists treat RLS more aggressively when blood ferritin levels (a measure of stored iron) fall below 100 micrograms per liter, and iron supplementation is often the first step.

If your legs feel restless and uncomfortable rather than painfully cramped, and the sensation eases the moment you get up and walk around, RLS is a strong possibility.

Nerve Damage and Neuropathy

Peripheral neuropathy, particularly the type caused by diabetes, commonly produces leg pain that worsens at night. This pain typically starts in the feet and works its way up, and it often feels like burning, tingling, or stabbing rather than the deep ache of a cramp. It affects both legs symmetrically in most cases.

The nighttime pattern has a straightforward explanation. During the day, your brain is busy processing input from your environment, which partially drowns out pain signals from damaged nerves. At night, when sensory distractions drop away, those signals become louder. The result is pain that may barely register during a busy afternoon but becomes impossible to ignore in a quiet, dark bedroom.

Diabetes is the most common cause of peripheral neuropathy, but alcohol use disorder, certain vitamin deficiencies (especially B12), kidney disease, and some chemotherapy drugs can also damage peripheral nerves in a way that produces the same nighttime pattern.

Circulation Problems

Two vascular conditions can cause leg pain that shows up or worsens at night: peripheral artery disease (PAD) and chronic venous insufficiency.

PAD narrows the arteries that supply blood to your legs. In its earlier stages, it causes pain during walking that stops when you rest. But as it progresses, the reduced blood flow becomes severe enough that your legs hurt even while you’re lying still. This rest pain often targets the feet and toes and tends to feel worse when your legs are elevated in bed. People sometimes find they get relief by dangling their feet off the side of the bed or sleeping in a recliner, because gravity helps blood reach the lower legs.

Venous insufficiency is a different mechanism. Here, the valves in your leg veins don’t close properly, so blood pools in the lower legs throughout the day. By evening, you may notice aching, throbbing, swelling around the ankles, and a heavy feeling. The pain from venous insufficiency tends to be worst after prolonged standing and improves when you elevate your legs, which is the opposite pattern from PAD.

Warning Signs That Need Urgent Attention

Most nighttime leg pain is not dangerous. But certain symptoms point to a blood clot in a deep leg vein, known as deep vein thrombosis (DVT), which requires prompt medical evaluation. DVT typically affects one leg, not both, and produces:

  • Swelling in the affected leg
  • Pain or soreness that often starts in the calf and feels like a persistent cramp
  • Skin color changes, such as redness or a purplish discoloration
  • Warmth over the painful area

The serious risk with DVT is that a clot can break loose and travel to the lungs. If you experience sudden shortness of breath, chest pain that worsens with deep breathing, a rapid pulse, dizziness, or coughing up blood, that combination is a medical emergency.

How to Reduce Nighttime Leg Cramps

For the garden-variety cramp, a few practical changes make a real difference. Stretching your calves before bed is the most consistently helpful strategy. Stand facing a wall, place one foot behind you with the heel flat on the floor, and lean forward until you feel a pull in your calf. Hold for 20 to 30 seconds on each side. Doing this nightly can reduce cramp frequency significantly.

Staying hydrated matters, especially if you exercise during the day or take diuretic medications. Many people cut off fluids early to avoid nighttime bathroom trips, but this can set the stage for cramps. A moderate approach works better than stopping fluids entirely hours before bed.

When a cramp hits, the fastest relief comes from stretching the muscle in the opposite direction of the contraction. For a calf cramp, flex your foot by pulling your toes toward your shin, or stand and press your heel into the floor. Walking around for a few minutes afterward helps the muscle relax fully and reduces lingering soreness.

Sorting Out Your Specific Cause

The pattern of your pain is the best clue to its cause. A sudden, intense charley horse that lasts seconds to minutes and then fades is almost certainly a muscle cramp. A restless, crawling discomfort that only eases when you move points to RLS. Burning or tingling that starts in the feet and persists steadily through the night suggests neuropathy. Aching with visible swelling indicates a vein or artery issue.

If your nighttime leg pain happens once in a while after a long day, it’s likely nothing more than muscle fatigue. If it’s happening several nights a week, waking you regularly, or accompanied by swelling, numbness, or skin changes, those patterns are worth investigating. Tracking when the pain occurs, what it feels like, and what makes it better or worse gives any clinician a much clearer starting point for figuring out what’s going on.