How to Sleep Better with Ankylosing Spondylitis

Sleeping with ankylosing spondylitis is difficult because the disease causes inflammation that peaks at night, leading to stiffness and pain that disrupt sleep and carry into the morning. The good news is that a combination of position adjustments, the right sleep surface, and a consistent pre-bed routine can make a real difference in how well you sleep and how you feel when you wake up.

Why AS Pain Gets Worse at Night

Ankylosing spondylitis doesn’t hurt evenly throughout the day. Inflammatory chemicals in your body follow a circadian rhythm, rising and falling on a roughly 24-hour cycle. In inflammatory spinal conditions like AS, these chemicals ramp up during the nighttime hours, which is why you may feel relatively manageable during the afternoon but wake at 2 or 3 a.m. with deep, aching back pain. This isn’t psychological. It’s a measurable spike in inflammatory activity that peaks in the early morning hours.

That same surge is responsible for morning stiffness, which in AS patients lasts an average of about two hours. The stiffness isn’t just from lying still. It’s a direct consequence of overnight inflammation settling into the spine and sacroiliac joints. Understanding this pattern is useful because it means many of the strategies below are specifically timed to counteract that inflammatory wave.

Best Sleep Positions for Spinal Alignment

The goal with any sleep position is to keep your spine as straight and neutral as possible. Over time, AS can cause vertebrae to fuse, and sleeping in a curled or hunched position encourages fusion in a flexed posture that limits mobility permanently. This makes position choices more than a comfort preference.

Back sleeping is generally the best option. It distributes your weight evenly and keeps the spine in a neutral line. Use a supportive neck pillow designed for back sleepers, and place a pillow under your knees. The knee pillow takes pressure off your lower back by flattening the lumbar curve slightly.

Side sleeping works well if back sleeping is uncomfortable, especially if you have hip or sacroiliac joint pain. Use a slightly higher pillow under your head to keep your neck aligned with your spine, and place a firm pillow between your knees. The knee pillow prevents your top leg from pulling your pelvis forward, which reduces strain on both the hips and lower back.

Stomach sleeping is the one position to avoid. It forces the lower back into extension and twists the neck to one side for hours, creating excessive stress on the lumbar spine. If you’re a lifelong stomach sleeper, transitioning away from it is one of the highest-impact changes you can make.

One common piece of advice for AS specifically: resist the urge to curl into the fetal position, even though it may feel comforting in the moment. A curled spine under hours of inflammatory pressure is more likely to stiffen in that curved shape over time.

Choosing the Right Mattress and Pillows

A medium-firm mattress tends to work best for people with back and joint pain. A large clinical trial found that medium-firm surfaces alleviate pain more effectively than soft or very firm ones, likely because they offer enough support to keep the spine aligned while still cushioning pressure points at the shoulders and hips. If you weigh more than 230 pounds, a firmer mattress helps distribute weight more evenly and prevents your hips from sinking too deep, which can throw spinal alignment off.

For pillows, a cervical (neck) pillow bridges the gap between your shoulders and head so your neck doesn’t bend at an angle where your head meets the pillow. This matters in AS because the cervical spine can be affected by inflammation and fusion. If you’re a side sleeper, you need a thicker pillow than a back sleeper to fill the wider space between your ear and the mattress. The pillow between your knees should be firm enough that it doesn’t compress flat by morning.

If your mattress is more than seven or eight years old and you’re waking with increased stiffness, replacing it is worth considering before adding other interventions. A sagging mattress undermines every other positional strategy.

A Pre-Sleep Routine That Reduces Stiffness

What you do in the hour before bed directly affects how your overnight inflammation plays out. Three things are particularly effective.

Warm bath or shower. A 20-minute soak in warm water before bed loosens joints, relieves pain, and relaxes muscles. Warm water is especially soothing for the stiff, aching joints characteristic of AS. If you can do a few gentle stretches while in the tub, you’ll also release built-up tension in your spine and hips. The drop in core body temperature after you get out of the bath also signals your brain that it’s time to sleep, which can help you fall asleep faster.

Evening stretches. The National Axial Spondyloarthritis Society recommends a dedicated end-of-day stretch routine to allow your body to decompress. Focus on gentle spinal extension (lying face-down and propping up on your elbows for a minute), hip flexor stretches, and slow trunk rotations. The point isn’t an intense workout. It’s restoring some range of motion before your body settles into one position for hours. Even five to ten minutes makes a noticeable difference in how stiff you feel at 6 a.m.

Anti-inflammatory timing. If you take anti-inflammatory medication for AS, talk to your prescribing provider about when to take it. Because inflammatory activity peaks overnight and into the early morning, some people benefit from taking their dose in the evening rather than the morning. The goal is to have the medication working during the hours when inflammation is highest, rather than after you’ve already woken up stiff and in pain. In clinical studies, AS patients experienced an average of about two hours of morning stiffness regardless of specific formulation, so timing the dose to cover the overnight window can be a practical adjustment.

Managing the Mental Side of Poor Sleep

Chronic pain and poor sleep feed each other in a loop: pain disrupts sleep, and poor sleep lowers your pain threshold the next day, which makes the following night worse. Over time, this cycle can create anxiety around bedtime itself, where you start dreading the night because you associate it with pain and frustration.

Cognitive behavioral therapy (CBT) has shown measurable benefits for AS patients with sleep problems. In a study of 88 AS patients with sleep disturbances, those who received CBT alongside standard treatment showed significantly improved sleep quality scores across every measured category compared to those receiving standard treatment alone. CBT for insomnia works by restructuring the thought patterns and behaviors that perpetuate poor sleep, such as lying in bed awake for long periods, catastrophizing about tomorrow’s fatigue, or using screens as a distraction from pain.

Disease activity itself predicts sleep quality. The standard AS symptom questionnaire (BASDAI) tracks fatigue, stiffness, and pain on a 0-to-10 scale, and fatigue is the single item most strongly correlated with poor sleep. A score of 4 or above indicates high disease activity. If your sleep problems are worsening despite good sleep habits, it may signal that your underlying disease isn’t well controlled, which is worth raising with your rheumatologist rather than treating as a standalone sleep issue.

Sleep Apnea and AS

You may have seen claims that AS significantly increases sleep apnea risk. The data on this is mixed. One large U.S. database study found AS patients had higher rates of diagnosed sleep apnea than the general population (8.8% vs. 5.1%), but a more detailed study using home sleep monitoring found that the actual prevalence of obstructive sleep apnea in AS patients was similar to matched controls, around 48% in both groups when using sensitive monitoring equipment. The difference may reflect the fact that AS patients are more likely to be evaluated for sleep problems, not that the disease itself causes apnea.

That said, if you snore heavily, wake gasping, or feel exhausted despite getting enough hours of sleep, it’s worth being evaluated separately for sleep apnea. Untreated apnea amplifies every other sleep problem AS causes, and treating it can produce dramatic improvements in daytime energy and pain tolerance.

Practical Setup for Tonight

If you want to start improving your sleep immediately, here’s what to prioritize:

  • Position: Sleep on your back with a pillow under your knees, or on your side with a pillow between your knees. Avoid stomach sleeping.
  • Pillow: Use a cervical pillow that supports your neck without pushing your head forward. Side sleepers need a thicker pillow than back sleepers.
  • Pre-bed routine: Take a warm bath or shower 30 to 60 minutes before bed. Do five minutes of gentle stretching afterward.
  • Mattress check: If your mattress sags or is very soft, a medium-firm replacement is likely to help.
  • Medication timing: Ask your provider whether shifting your anti-inflammatory dose to the evening might better cover your overnight symptoms.

None of these changes eliminates AS pain entirely, but stacking several of them together can meaningfully reduce the number of times you wake at night and cut down the duration of morning stiffness. Most people notice improvements within the first one to two weeks of consistent changes.