You need sleep to rejuvenate your body and feel energized for the day ahead. Yet a good night’s rest can be hard to come by when you have ankylosing spondylitis (AS).

Between 35 and 90 percent of people with AS complain of poor sleep. It’s tough to stay asleep at night when your body hurts. The more severe your disease is, the less likely you are to get the rest you need. And the less you sleep, the worse your pain and stiffness could become.

You don’t have to settle for disrupted sleep. See your rheumatologist and primary care doctor for advice on how to manage sleep issues.

And in the meantime, you can try out these tips to help you sleep longer and more soundly.

The less pain you’re in, the easier it will be for you to sleep. You’ll need to make sure that you’re on the best treatment to slow your disease and manage your pain.

A lot of the pain you experience may be a result of inflammation, so nonsteroidal anti-inflammatory drugs (NSAIDs) and TNF inhibitors can help decrease inflammation and prevent further damage to your joints caused by AS. TNF inhibitors might also help improve the quality of your sleep, research suggests.

Besides inflammation, nerve compression and mechanical problems can also contribute to your pain. If the drug you’ve been taking isn’t managing your inflammation and pain, talk with your rheumatologist. You might need a different medication or dosage.

Your bed should be both comfortable and supportive. Look for a firm mattress that keeps your body in proper alignment.

However, you might want to find your “sweet spot” between a soft and firm mattress. A firm mattress will give you support, but it shouldn’t be so firm that it doesn’t conform to your unique body shape.

Test out several mattresses in the store until you find one that feels right.

A brisk walk will get your blood pumping and wake up your muscles and joints. It will also prime your body for sleep. Exercise also helps counter the inflammation that causes the back pain of AS.

Exercise improves the quality and quantity of your sleep. It will help you get more of the deep and restorative slumber your body needs to heal. You’ll also fall asleep faster if you get in a good workout that day.

The time of day you exercise is key. An early morning fitness program will help you sleep best. Working out too close to bedtime can wind up your brain to the point where you can’t fall asleep.

Warm water is soothing to sore joints. A 20-minute bath before bed will loosen up your joints and relieve pain so that you can sleep more soundly.

Soaking in a warm tub will also relax your body before bed. And if you do a few stretches while you’re in the bath, you’ll also relieve any built-up stiffness in your joints.

Lying on a thick pillow can put your head into an unnaturally hunched position when you get out of bed. Instead, try using a thin pillow.

Lie on your back and place the pillow under the hollow of your neck to keep your head in the correct alignment. You can also consider not using a pillow at all.

Lying flat on your back with a straight spine may help with comfort. If you’re on your side, avoid curling your legs up into your body, though you can use a pillow to lift your knees.

You may also want to skip the mattress completely and relax in a recliner or comfortable chair. Try out positions in the chair and see whether they can support your spine and help you sleep through the night.

You can create optimal sleeping conditions before you even slide under the sheets. Set the thermostat to 60–67°F (15–19°C) — it’s more comfortable to sleep in a cool climate than in a warm one.

Pull down the shades so that the sun doesn’t wake you in the early morning. You may also wish to keep your bedroom quiet and put away your cell phone or other digital devices that might go off and disturb your sleep.

Snoring is a sign of obstructive sleep apnea, a condition that causes you to stop breathing for brief periods during the night.

People with AS are more likely to have sleep apnea. And those with sleep apnea tend to have more damage to their spine.

Every time you stop breathing, your brain wakes you up to open your airways. As a result, you never feel fully rested during the day. If your partner or loved one says that you snore or you’ve woken yourself up mid-snore, see your doctor for an evaluation.

Doctors have many ways to treat sleep apnea. One common treatment involves a machine called continuous positive airway pressure (CPAP) that blows air into your airway to keep it open while you sleep.

Engaging in relaxation techniques before bed can help you get to sleep and stay asleep. There’s some research to support that deep breathing and progressive muscle relaxation (PMR) can promote stress reduction.

The Arthritis Foundation has step-by-step information on deep breathing. You can also try PMR using these basic steps:

  1. Lie down in a comfortable position. Use pillows or blankets for areas that need extra support.
  2. Tighten all of the muscles in your body. Hold this position for a few seconds, but not to the point of pain.
  3. Release all of your muscles. Note the difference in how you feel when your body is tense compared to when you release your muscles.
  4. Repeat steps 2–3 two or three more times.
  5. Tighten each muscle group, hold, and release. Focus on one muscle group at a time, starting with your toes and gradually working up through the body.
  6. Lie quietly and breathe deeply for a few minutes after you have tensed and released every set of muscles.

There are many other relaxation techniques that may help with sleep, including meditation. A 2019 review of studies found that mindfulness meditation may help prevent sleep disturbances.

Part of good sleep hygiene is keeping up with a regular sleep-wake cycle. Sticking to a regular time for getting up and going to bed can help maintain this.

The U.K.-based National Ankylosing Spondylitis Society also recommends getting exposure to bright light during the day. They specifically recommend light exposure in the late afternoon. If it’s too difficult to get outside, consider an indoor bright light or light therapy lamp.

A balanced diet can help you feel your best. Eating certain foods may also help prevent inflammation that contributes to AS, such as by following the Mediterranean diet, as recommended by the Arthritis Foundation.

Avoiding caffeine, nicotine, and other stimulants before bed can help ensure you stay asleep after you fall asleep. Not eating spicy or fried foods in the evening can also prevent heartburn, which can disrupt your sleep.

Here are some questions people often ask about ankylosing spondylitis and sleep.

Why does ankylosing spondylitis hurt more at night?

The back pain from ankylosing spondylitis comes from inflammation. Movement and exercise are known to help reduce inflammation.

When you’re trying to sleep, your body is not moving, but inflammation still occurs. This leads to greater levels of pain in many people, often relieved through exercise.

How can I relieve pain from ankylosing spondylitis?

Regular exercise can help reduce stiffness and increase mobility. Spine-strengthening and water-based exercises may be of particular benefit.

In addition, regular aerobic exercises can increase the levels of natural opioids, which can in turn reduce pain.

For immediate pain relief, consider NSAIDs like ibuprofen or naproxen. Your doctor may also recommend corticosteroids or other medications to help with pain from AS.

How much sleep do you need for ankylosing spondylitis?

A person with ankylosing spondylitis needs the same amount of sleep as those without the condition. The Centers for Disease Control and Prevention recommends that adults get 7 or more hours of quality sleep per night.

But if you experience sleep disturbances because of AS, you may have to sleep for longer hours to get the quality sleep you need.

Do people with ankylosing spondylitis need more sleep?

People with ankylosing spondylitis frequently experience fatigue and therefore may need more sleep and rest overall.

The National Ankylosing Spondylitis Society recommends that people take a rest break during exercise or other activities for about 10 minutes every hour if needed. Pacing yourself during daily activities is also important to prevent fatigue.

If you’re living with AS and experiencing poor sleep, talk with your doctor. Based on your symptoms, they may suggest switching medications or trying some natural remedies.

To live a happy, healthy life, we all need a good night’s rest. Try these tips and follow your doctor’s recommendations to catch the Zzz’s you need.