There are a number of ways that ankylosing spondylitis can affect your muscles. For starters, inflammation associated with the condition can cause muscles and other soft tissues to become sore and hard to move. Muscles in your back may also shorten or tighten, which can lead to a dull, aching pain, according to the National Ankylosing Spondylitis Society (NASS). In addition, joints that are stiff or have limited range of motion may force you to assume uncomfortable postures or to change the way you walk, sit, or perform certain activities, which can strain muscles. What’s more, muscle spasms often affect people who have ankylosing spondylitis.

What Are Muscle Spasms?

According to Susan M. Goodman, MD, a rheumatologist at the Hospital for Special Surgery in New York City, a muscle spasm is a sudden, involuntary contraction of a muscle. These spasms can occur in people who have most forms of arthritis, and they can be very painful and limit mobility and strength. In ankylosing spondylitis, most people experience muscle spasms in their lower back, often during a flare, or a period of time when your symptoms worsen. According to NASS, the pain associated with these spasms can be sharp and intense, and people who experience them explain that they feel as if their muscles are moving beyond their control. Ankylosing spondylitis typically originates in the lower back, and any form of arthritis in the joints in this area can put added pressure in the spinal cord, leading to tightness in the muscles in the back, buttocks, and legs, according to the Spondylitis Association of America (SAA). Tightness can cause muscles to spasm.

How to Relieve Muscle Spasms

It’s likely that you’ll experience muscle spasms, at least occasionally, when you have ankylosing spondylitis. What can you do to treat them? The Cleveland Clinic recommends gently stretching and massaging the affected muscle, and keeping it in a stretched position until the spasm or pain subsides. Applying cold or heat to the affected area can also help. Cold compresses can help reduce muscle inflammation, while heat can help ease tight muscles and reduce pain, according to the SAA. Try taking a warm bath or shower to soothe sore or spasming muscles. Certain complementary therapies, like acupuncture and massage therapy, may also help. Arthritis New South Wales recommends practicing relaxation techniques to help decrease muscle tension and spasms. Goodman notes that prescription muscle relaxants can also help, as can nonsteroidal anti-inflammatory drugs. “They work particularly well for nighttime cramps associated with ankylosing spondylitis,” she adds. However, you should talk to your doctor before starting any pain reliever.

Can Muscle Spasms Be Prevented?

It’s difficult to prevent muscle spasms when you have ankylosing spondylitis, Goodman notes, but you can reduce your risk for them by making sure you stay well-hydrated by drinking lots of water throughout the day. Fluids help your muscles contract and relax. Goodman also recommends working with your care team to develop an exercise plan that includes stretching and extension exercises. Stretching exercises can loosen tight muscles and improve mobility. According to the SAA, extension exercises for the lower back help to increase flexibility of the lumbar curve. They recommend pelvic tilts and the use of resistance bands to improve strength and range of motion. Still, if your muscle spasms are severe or occur frequently, and they don’t respond to treatment, talk to your doctor. It may mean that you need to try a different approach.