Sleeping with a hamstring injury comes down to one goal: keep the muscle long, relaxed, and supported so it is not stretched or compressed while you rest. The most reliable setup is sleeping on your back or on the side opposite the injured leg, with a pillow under the knees or between the legs to take tension off the hamstring. Avoid sleeping on your stomach, which pulls the hamstring into a shortened position and often makes morning stiffness worse.
A hamstring strain is one of the most common sports injuries, and it can make something as basic as lying down feel uncomfortable. The good news is that sleep position is one of the few things you can control while the muscle heals. Get the position right and most people can rest reasonably well even in the first week.
Why Does A Hamstring Injury Hurt More At Night?
Night pain after a muscle strain is common, and it usually has more to do with position and circulation than with the injury getting worse overnight.
When you lie down, you stop moving. During the day, small shifts in posture keep the muscle from settling into one position for too long. At night, a hamstring that is slightly swollen or inflamed can stiffen in whatever position it holds for hours. Waking up with a tight, achy leg is often the result of that stillness, not a sign of new damage.
There is also a positional factor. The hamstring runs along the back of the thigh from the sit bone to below the knee. Any sleeping position that bends the hip and straightens the knee — or the reverse — puts the muscle under some degree of stretch. Stomach sleeping is the clearest example. Lying face down flattens the leg and can pull the healing tissue.
Finally, swelling and inflammation tend to pool when you are horizontal and still. This is why elevation and gentle support matter, even at night. The muscle does not need to be immobilized, but it does need to avoid prolonged tension.
What Is The Best Sleeping Position For A Hamstring Injury?
Back sleeping with a pillow under the knees is the position most clinicians suggest for a hamstring strain. It keeps the hip slightly flexed and the knee bent, which shortens the hamstring and takes tension off the healing tissue.
If you cannot sleep on your back, side sleeping works too — but only on the side opposite the injured leg. Lying on the injured side presses directly on the muscle and often increases pain. When you sleep on your good side, place a pillow between your knees. This keeps the top leg from dropping forward and pulling on the hamstring.
Here is a simple comparison of the main options:
| Position | What It Does | Best For |
|---|---|---|
| Back with pillow under knees | Keeps hamstring shortened and relaxed | Most hamstring strains |
| Side (opposite leg) with pillow between knees | Prevents leg from dropping and stretching | Side sleepers |
| Stomach | Can stretch or compress the hamstring | Generally avoid during recovery |
If you are a lifelong stomach sleeper, the transition can be awkward for a few nights. A body pillow along your side can help you stay on your back or side without rolling over in your sleep.
How Should You Position Pillows To Support The Hamstring?
Pillow placement matters as much as which side you sleep on. The goal is to keep the knee slightly bent and the hip neutral, so the hamstring is not under load.
- Under the knees (back sleeping): A single pillow or a rolled towel under the knees lifts the legs slightly and relaxes the hamstring. Too high and you may wake with low back discomfort.
- Between the knees (side sleeping): A pillow thick enough to keep your hips level. A thin pillow lets the top leg sag and pull on the muscle.
- Under the calf or ankle: Sometimes helpful if the back of the thigh feels tender against the mattress. It lifts the leg just enough to reduce pressure.
One detail people miss: a mattress that is too soft lets the injured leg sink and roll inward, which can tug on the hamstring. If your mattress sags, a firmer topper or a folded blanket under the hip can help. This is not a cure, but it can reduce nighttime discomfort.
Does Ice Or Heat Help At Night?
Ice is generally used in the first 48 to 72 hours after a strain to reduce pain and swelling. Applying a cold pack wrapped in a cloth for about 15 to 20 minutes before bed is a common approach. Never place ice directly on the skin.
Heat is more often used after the initial inflammatory phase, once swelling has settled. A warm shower or a heating pad on a low setting can relax the muscle and make it easier to fall asleep. Do not use heat on a leg that is still swollen or hot to the touch.
The evidence for ice versus heat in muscle strains is not strong in either direction. Both are used mainly for comfort. Neither speeds healing in a way that has been clearly demonstrated in large trials. If one helps you sleep and does not make things worse, that is a reasonable reason to use it.
What About Pain Relief And Sleep Aids?
Over-the-counter pain relievers such as acetaminophen or ibuprofen are commonly used for muscle strain pain. Ibuprofen is an anti-inflammatory, so some people use it early on when swelling is present. Follow the label directions, and check with a pharmacist or doctor if you take other medications or have kidney, stomach, or heart conditions.
Sleep aids are a different question. There is no clinical evidence that prescription sleep medication helps a hamstring heal, and some sleep aids can leave you groggy and more likely to move awkwardly the next day. If pain is regularly keeping you awake, that is worth mentioning to a doctor rather than managing with medication alone.
One point that is often overlooked: persistent night pain that is not improving after a couple of weeks may point to something more than a simple strain. A doctor can check for a more serious tear or another cause.
How Long Does It Take To Sleep Comfortably Again?
Most mild hamstring strains improve enough within one to two weeks that sleep becomes easier. More significant strains can take longer, and full recovery often runs several weeks depending on the grade of the injury.
Sleep quality tends to track with the injury itself. As pain and swelling decrease, the positions that felt impossible early on become comfortable again. If you are still waking in pain after a few weeks, or if the pain is getting worse rather than better, that is a reason to get it checked.
Do not judge healing by a single bad night. Recovery from a muscle strain is rarely a straight line, and a rough night after a good stretch of sleep is normal.
Frequently Asked Questions
What is the best sleeping position for a hamstring injury?
Sleeping on your back with a pillow under your knees is the position most clinicians suggest because it keeps the hamstring relaxed. If you sleep on your side, lie on the side opposite the injured leg with a pillow between your knees.
Should I sleep with a pillow between my knees for a hamstring strain?
Yes, if you sleep on your side. A pillow between the knees keeps the top leg from dropping forward and pulling on the hamstring. Use one thick enough to keep your hips level.
Is it bad to sleep on my stomach with a hamstring injury?
Stomach sleeping is generally avoided during recovery because it can stretch or compress the hamstring. If you must sleep face down, a pillow under your hips may reduce the pull on the muscle.
How long does hamstring pain last at night?
For mild strains, night pain often eases within one to two weeks as swelling and inflammation settle. More serious strains can take longer, and pain that worsens after a few weeks should be checked by a doctor.

