How we make money: Some links on this page are affiliate links, marked “Sponsored.” If you buy through one, we may earn a commission. It doesn’t change what we write. This article is general information, not medical advice.
Chronic pain and sleep problems often turn up together. A 2013 research review reports sleep complaints in 67% to 88% of chronic pain disorders, and chronic pain in at least half of people with insomnia.[1] Research suggests the link runs both ways: pain can disturb sleep, and poor sleep may make pain worse.[2]
In brief
- Pain and sleep affect each other, but day-to-day studies suggest poor sleep predicts pain more strongly than pain predicts poor sleep.[1]
- With back pain, try sleeping on your side with a pillow between your knees, or on your back with a pillow under your knees. Try to avoid sleeping on your stomach.[3][4]
- Cognitive behavioral therapy for insomnia (CBT-I) is generally the first treatment recommended for long-term insomnia.[5] In people with chronic pain it improves sleep, but it’s less clear whether it eases the pain itself.[6][7]
How chronic pain and sleep affect each other

A 2013 review of the research since 2005 found that, in large population studies, sleep problems reliably predicted new cases of chronic pain and flare-ups of existing pain. Studies that tracked people night by night suggested sleep problems predict pain more strongly than pain predicts sleep problems. Lab studies suggest poor sleep may also weaken the body’s own system for dampening pain.[1]
The effect shows up from one day to the next. In a nationally representative sample of 971 adults who reported their sleep and pain every day for a week, the hours slept the night before predicted how often they had pain the next day. Sleeping less than 6 hours or more than 9 hours was linked with more pain the following day. Pain also predicted the next night’s sleep, though less strongly.[8]
Over months and years, the pattern looks similar. A 2018 review of 16 long-term studies with about 61,000 people found that when sleep quality or quantity got worse, it was linked with a two- to threefold higher risk of developing a pain condition.[9] A Dutch study of 1,753 young adults, checked at average ages of 19 and 22, found that sleep problems predicted chronic pain three years later. The link was stronger in women, and tiredness, rather than anxiety, depression or inactivity, seemed to explain it.[10] These are observational studies. They show a link, and the 2018 review’s authors note that whether poor sleep actually drives pain still needs to be pinned down.[9]
Sleep problems that often come with chronic pain
A 2018 meta-analysis of sleep lab studies found that people with chronic pain took longer to fall asleep, woke more often and spent more time awake during the night than people without pain. About 44% of people with chronic pain in the studies had a diagnosed sleep disorder, most often insomnia, restless legs syndrome or obstructive sleep apnea.[11] Other things can add to the problem:
- Mood. Stress, anxiety and depression are among the most common causes of insomnia.[12] If you have poor sleep, depression or anxiety over a long period, back pain can become more frequent and more severe.[13] Our guide to the psychology of pain explains how mood and stress shape pain.
- Fibromyalgia. It causes pain throughout the body, along with tiredness and trouble sleeping.[14] See our guide to fibromyalgia pain management.
- Restless legs syndrome. A strong urge to move your legs, usually when you’re resting at night, which can affect your sleep.[15]
- Medicines. Many prescription drugs can interfere with sleep, including certain antidepressants and medicines for asthma or blood pressure. Some nonprescription pain medicines contain caffeine.[16]
Sponsored · Pain app · Web, iPhone & Android
Pain that won’t settle? Try a free 2-minute pain test
PainApp is built on Pain Reprocessing Therapy. Alongside the free test, the app gives you audio lessons, an AI pain coach and a pain tracker.
- Free pain test
- 2 min to finish
- 3 days free trial
Free test · 3-day free trial on the app, cancel anytime
How back pain affects sleep
In a study of 80 people with low back pain who kept sleep diaries, a more painful day was followed by a worse night: they took longer to fall asleep, woke more during the night, spent less of their time in bed asleep and rated their sleep as worse. It worked the other way too, as a night of poor sleep was followed by a more painful day.[17] In a larger study of 1,246 people with recent-onset low back pain, worse sleep quality was strongly linked with more pain afterward, even after allowing for depression and other factors. The authors of both studies say it isn’t yet known whether improving sleep reduces back pain.[17][18]
Spending more time in bed isn’t the answer. The NHS advises against staying in bed for long periods, and suggests staying active and keeping up your daily activities.[19] If your pain comes from the sacroiliac (SI) joint, see how to sleep with sacroiliac joint pain. For pain that runs down your leg, see how to sleep with sciatica.
Best sleeping positions for lower back pain
Simple changes to your sleeping position can take strain off your back, and Mayo Clinic frames its advice around the position you already sleep in.[4] The National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS) and MedlinePlus give similar advice.[3][20]
Sleeping on your side
Draw your legs up slightly toward your chest and put a pillow between your legs. Bending your knees with a pillow between your legs can help align your spine, pelvis and hips, and it takes pressure off your spine. A full-length body pillow is an option if you prefer one.[4] NIAMS suggests the same: sleep on your side with a small pillow between your knees.[3] For a new bout of low back pain, MedlinePlus suggests a curled-up, fetal position with a pillow between your legs.[20]
Sleeping on your back
Put a pillow under your knees. This may help relax your back muscles and keep the natural curve of your lower back. If you need more support, try a small rolled towel under your waist. Your pillow should keep your neck in line with your chest and back.[4] MedlinePlus also suggests a pillow or rolled towel under your knees to relieve pressure.[20]
One caution: sleeping on your back is linked with obstructive sleep apnea, and the NHS suggests that people with sleep apnea sleep on their side.[21] If someone has seen your breathing stop and start at night, or you always feel very tired in the day, see the signs below.
Sleeping on your stomach
Sleeping on your stomach can be hard on your back, so try other positions if you can. If you can’t sleep any other way, put a pillow under your hips and lower stomach to reduce the strain, and use a pillow under your head only if it doesn’t strain your back.[4] NIAMS also suggests avoiding stomach sleeping where possible.[3]
Sleeping positions at a glance
| Position | What to try |
|---|---|
| On your side | Knees drawn up slightly, a pillow between your knees or legs, or a full-length body pillow[3][4] |
| On your back | A pillow under your knees, plus a small rolled towel under your waist if you need more support[4][20] |
| On your stomach | Best avoided. If it’s the only way you can sleep, a pillow under your hips and lower stomach[3][4] |
What research says about sleep posture
The research on posture itself is thin. A 2019 scoping review found only four studies on sleep posture and spinal symptoms. Lying on your side was generally protective against symptoms, but there weren’t enough high-quality studies to answer the question.[22] A 2021 study filmed 53 adults sleeping at home over two nights. People who woke with neck symptoms spent more time in postures the researchers classed as provocative than people without symptoms, but the lower back group didn’t differ significantly from the symptom-free group.[23]
How to sleep with neck pain
The NHS lists a neck locked in an awkward position while sleeping as one of the most common causes of neck pain. It doesn’t name one best position. To ease neck pain, it suggests a low, firm pillow, and to help prevent it, it advises you to:[24]
- keep your head at the same height as the rest of your body when you sleep
- have a firm mattress
- avoid sleeping on your front
- avoid twisting your neck in bed
Sleep habits that help when you live with pain

The NHS lists long-term pain among the things that keep people from sleeping well, and says insomnia usually gets better when you change your sleeping habits.[12] Its self-help advice for insomnia includes:[12]
- Go to bed only when you’re sleepy, and get up at the same time every day.
- Relax for at least an hour before bed, for example with a bath or a book.
- Keep your bedroom dark and quiet. Curtains, blinds, an eye mask or earplugs can help.
- Exercise regularly during the day, but not within 4 hours of bedtime.
- Make sure your mattress, pillows and covers are comfortable.
- Skip alcohol, tea, coffee and smoking for at least 6 hours before bed, and don’t eat a big meal late at night.
- Put your phone away and turn off the TV before bed, because the blue light makes you more awake.
The CDC also suggests keeping your bedroom cool, turning off electronic devices at least 30 minutes before bed and avoiding caffeine in the afternoon or evening.[25] Alcohol may help you fall asleep, but it prevents deeper stages of sleep and often wakes you in the night.[16]
Relaxation techniques such as progressive muscle relaxation, abdominal breathing and guided imagery are often part of CBT-I. On their own, they have only a small amount of low-quality evidence for long-term insomnia. Yoga and tai chi may improve sleep quality, but not necessarily insomnia.[26]
CBT for insomnia (CBT-I)
Cognitive behavioral therapy for insomnia can treat long-term sleep problems effectively, and it’s generally the first treatment recommended. The cognitive part helps you spot and change the worries and beliefs that keep you awake. The behavioral part builds habits that support sleep. Depending on your needs, it can include:[5]
- A fixed routine: the regular hours above, no naps, and using your bed only for sleep and sex.
- Sleep limits: if you can’t fall asleep within 20 minutes, you get up and go back to bed only when you’re sleepy, without changing your wake-up time. Your time in bed goes up again as your sleep improves.
- Relaxation techniques such as meditation, imagery and muscle relaxation.
- Staying passively awake: trying not to think about falling asleep, because worrying that you can’t sleep can keep you awake.
Most people need 6 to 8 sessions, though some need only one and others need more. Some approaches can cost you sleep at first.[5] The NHS notes that CBT can be done face to face with a therapist or through an online self-help program.[12]
Does CBT-I help when you have chronic pain?
For sleep, the evidence is strong. A 2025 meta-analysis of 67 trials with 5,232 adults who had chronic conditions, including chronic pain, found that CBT-I improved insomnia severity with a large effect, which the authors say appears comparable to results in people without a chronic disease. Side effects were rare.[27]
Its effect on pain is less clear. A 2024 review of 11 trials with 1,801 people with chronic musculoskeletal pain found a large benefit for insomnia but no significant effect on pain intensity.[6] A 2022 analysis of 16 trials found that CBT-I improved sleep, and also pain, disability and depression right after treatment, while CBT aimed only at pain did no better than control treatments. Those trials were small and at high risk of bias, so the authors advise caution.[7]
Sleeping pills, pain medicines and sleep
According to the NHS, family doctors in the UK now rarely prescribe sleeping pills for insomnia, because they can have serious side effects and you can become dependent on them. When they are used, it’s for a few days or weeks at most, and only if insomnia is very bad and other treatments haven’t worked.[12] Mayo Clinic says some prescription sleep medicines work as a short-term treatment, but they’re generally not the best long-term option, and their risks include dependence and withdrawal symptoms.[5]
Sleep aids sold without a prescription, some of which contain an antihistamine, may help you sleep better for 1 to 2 weeks but shouldn’t be taken for longer, and they can leave you drowsy. Check with your doctor before taking anything for sleep.[12]
Pain medicines matter too. Sedatives and some prescription painkillers make it harder to breathe and can make obstructive sleep apnea worse.[28] The NHS advises people with sleep apnea not to take sleeping pills unless a doctor recommends them.[21] If you think a medicine you take is affecting your sleep, talk to your health care provider about how best to manage it.[5]
Treating pain and sleep together
The 2018 meta-analysis concluded that sleep problems in people with chronic pain should be assessed and treated alongside the pain.[11] For back pain that doesn’t get better after a few weeks, the NHS lists options including group exercise sessions, physical therapy, manual therapy and CBT to help you cope with the pain.[19] Our guides to physical therapy for chronic pain and lifestyle changes for pain cover these in more detail.
When to see a doctor
See a doctor if:
- changing your sleep habits hasn’t helped, you’ve had trouble sleeping for months, or insomnia is making daily life hard to cope with[12]
- your breathing stops and starts while you sleep, you make gasping, snorting or choking noises, or you always feel very tired during the day. These are signs of sleep apnea. It can help to ask someone to watch you sleep.[21]
- restless legs are stopping you from sleeping[15]
- back pain doesn’t improve after resting or is worse at night, or you’ve lost weight without trying[19]
- neck pain hasn’t gone after a few weeks, or comes with pins and needles or a cold arm[24]
Contact a doctor right away if back pain wakes you up at night, is worse when you lie down, or is so severe you can’t get comfortable.[20]
Get an urgent appointment if you have back pain and feel hot, cold, shivery or generally unwell, or the pain is severe and started suddenly or is getting worse quickly.[19]
Call 911 or go to the ER if you have back pain with any of these:[19]
- pain, tingling, weakness or numbness in both legs
- loss of feeling around your genitals or anus
- changes in your bladder or bowels, such as trouble peeing or losing control of your bladder or bowels
- changes in how your penis or vagina feels during sex, or trouble getting an erection or reaching orgasm
- chest pain
- pain that started after a serious accident, such as a car crash
Don’t drive when you feel sleepy.[12]
Common questions
How much sleep do adults need?
The CDC recommends 7 or more hours a night for adults aged 18 to 60, 7 to 9 hours from 61 to 64, and 7 to 8 hours from age 65.[25] Needs vary from person to person. If you’re tired all the time during the day, you’re probably not getting enough.[12]
What kind of mattress is best for back pain?
A 2021 review of 39 studies concluded that medium-firm mattresses offer more advantages than other types for people with nonspecific low back pain. In one trial in the review, of 313 adults with chronic low back pain, people given medium-firm mattresses improved more in pain and disability than those given firm ones.[29] The NHS’s neck pain advice mentions a firm mattress,[24] but that trial was in low back pain.
Can melatonin help me sleep?
It may help with falling asleep. In people with insomnia, a 2022 review found melatonin helped them fall asleep faster and feel less sleepy in the day, but didn’t improve sleep quality or time awake at night. Two clinical guidelines, from 2017 and 2019, recommended against it for long-term insomnia. Melatonin seems relatively safe short term, but its long-term safety isn’t known, and many gummy products contain a different amount than the label says.[26]
Free · From APM Health
Get our free morning movement routine
A short routine for easing stiff joints and muscles into the day. Sign up now and we’ll email it as soon as it’s ready.
- Free
- Sent as soon as it’s ready
- One email a week at most
Unsubscribe any time. Privacy policy
How we checked this article
Medical review: pending. A clinician hasn’t reviewed this article yet. We last checked it against the sources below on November 7, 2026.
Sources
- Finan PH, Goodin BR, Smith MT. The association of sleep and pain: an update and a path forward. J Pain. 2013;14(12):1539-1552.
- Smith MT, Haythornthwaite JA. How do sleep disturbance and chronic pain inter-relate? Insights from the longitudinal and cognitive-behavioral clinical trials literature. Sleep Med Rev. 2004;8(2):119-132.
- National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS). Back pain: diagnosis, treatment, and steps to take. Last reviewed February 2023.
- Mayo Clinic. Sleeping positions that reduce back pain. January 19, 2024.
- Mayo Clinic. Insomnia treatment: cognitive behavioral therapy instead of sleeping pills. April 5, 2023.
- Salazar-Méndez J, Viscay-Sanhueza N, Pinto-Vera C, et al. Cognitive behavioral therapy for insomnia in people with chronic musculoskeletal pain: a systematic review and dose-response meta-analysis. Sleep Med. 2024;122:20-26.
- Enomoto K, Adachi T, Fujino H, et al. Comparison of the effectiveness of cognitive behavioral therapy for insomnia, cognitive behavioral therapy for pain, and hybrid cognitive behavioral therapy for insomnia and pain in individuals with comorbid insomnia and chronic pain: a systematic review and network meta-analysis. Sleep Med Rev. 2022;66:101693.
- Edwards RR, Almeida DM, Klick B, Haythornthwaite JA, Smith MT. Duration of sleep contributes to next-day pain report in the general population. Pain. 2008;137(1):202-207.
- Afolalu EF, Ramlee F, Tang NKY. Effects of sleep changes on pain-related health outcomes in the general population: a systematic review of longitudinal studies with exploratory meta-analysis. Sleep Med Rev. 2018;39:82-97.
- Bonvanie IJ, Oldehinkel AJ, Rosmalen JGM, Janssens KAM. Sleep problems and pain: a longitudinal cohort study in emerging adults. Pain. 2016;157(4):957-963.
- Mathias JL, Cant ML, Burke ALJ. Sleep disturbances and sleep disorders in adults living with chronic pain: a meta-analysis. Sleep Med. 2018;52:198-210.
- NHS. Insomnia. Page last reviewed March 19, 2024.
- National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS). Back pain. Last reviewed February 2023.
- National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS). Fibromyalgia. Last reviewed May 2024.
- NHS. Restless legs syndrome. Page last reviewed September 22, 2025.
- Mayo Clinic. Insomnia: symptoms and causes. January 16, 2024.
- Alsaadi SM, McAuley JH, Hush JM, et al. The bidirectional relationship between pain intensity and sleep disturbance/quality in patients with low back pain. Clin J Pain. 2014;30(9):755-765.
- Alsaadi SM, McAuley JH, Hush JM, et al. Poor sleep quality is strongly associated with subsequent pain intensity in patients with acute low back pain. Arthritis Rheumatol. 2014;66(5):1388-1394.
- NHS. Back pain. Page last reviewed March 5, 2026.
- MedlinePlus. Low back pain – acute. Review date June 27, 2026.
- NHS. Sleep apnoea. Page last reviewed May 11, 2026.
- Cary D, Briffa K, McKenna L. Identifying relationships between sleep posture and non-specific spinal symptoms in adults: a scoping review. BMJ Open. 2019;9(6):e027633.
- Cary D, Jacques A, Briffa K. Examining relationships between sleep posture, waking spinal symptoms and quality of sleep: a cross sectional study. PLoS One. 2021;16(11):e0260582. Correction: PLoS One. 2024;19(7):e0306662.
- NHS. Neck pain. Page last reviewed April 27, 2023.
- Centers for Disease Control and Prevention (CDC). About sleep. Last updated May 15, 2024.
- National Center for Complementary and Integrative Health (NCCIH). Sleep disorders and complementary health approaches: usefulness and safety. Last updated May 2024.
- Scott AJ, Correa AB, Bisby MA, et al. Cognitive behavioral therapy for insomnia in people with chronic disease: a systematic review and meta-analysis. JAMA Intern Med. 2025;185(11):1350-1361.
- Mayo Clinic. Obstructive sleep apnea: symptoms and causes. December 4, 2025.
- Caggiari G, Talesa GR, Toro G, Jannelli E, Monteleone G, Puddu L. What type of mattress should be chosen to avoid back pain and improve sleep quality? Review of the literature. J Orthop Traumatol. 2021;22(1):51.



