“The hips are so important,” says Lan Boehme, a physical therapist for UCLA Health in Los Angeles. She works with many people in the entertainment industry, including lighting technicians who need to maintain mobility to do their jobs. Many of her patients complain of hip pain as the condition progresses, she says. The good news is there are many things you can do to prevent or reduce hip pain and stiffness. Here are some winning strategies.

1. Talk to Your Doctor

He or she will want to pinpoint what is causing your pain — whether it’s your condition or possibly something else, says John M. Davis III, MD, MS, RhMSUS, professor of medicine at the Mayo Clinic College of Medicine and Science in Rochester, Minnesota. Then your doctor can recommend adjustments to your management and treatment plan to make sure all the elements — exercise, diet, supplements, medications, therapy, and physical aids or accommodations — are working for you.

2. Try Heat or Cold Therapy

Although ice packs can be good for acute pain (for example, an ankle sprain), Boehme finds people with ankylosing spondylitis respond best to heat. Heat increases circulation, which can help ease pain and stiffness. If your joint stiffness is worse in the morning, try taking a warm bath or shower soon after you wake up. You can also buy microwaveable heat packs or small charcoal-activated heat pads that adhere right to the skin.

3. Use a Foam Roller

A foam roller can be used to gently massage sore or tight muscles and to help loosen soft tissue. Ask a personal trainer or physical therapist to show you the right way to use a foam roller — and be careful not to overdo it. If you find a foam roller too painful or too difficult to use, Boehme suggests running a rolling pin over your thighs.

4. Don’t Forget to Stretch

Try stretching before you get out of bed in the morning. Morning stretches will help with stiffness and start your day off on a good note. Try bringing your knees up to your chest and holding them there. Or sit on the edge of your bed and hang one leg over the side while keeping your other knee bent.

5. Exercise, Exercise, Exercise

According to the National Axial Spondyloarthritis Society, in the U.K., exercise is the single most important thing you can do to help manage ankylosing spondylitis symptoms. According to a 2017 U.K. study for National Institute for Health Research, an increase in exercise improved ankylosing spondylitis symptoms and increased a person’s ability to perform daily functions. The exercises included home-based exercise, swimming, and Pilates. If you belong to a gym, you’ll find several machines that target the inner and outer thighs, which support the hip joint. At home, try bridges: Lie on your back, knees bent, feet flat on the floor hip-width apart, arms relaxed at your sides. Lift your buttocks off the floor, pushing with your heels, so your body makes a straight line from your knees to your shoulders. A personal trainer or physical therapist can show you additional exercises that can help strengthen your hips and ease pain.

6. Work Out in the Water

Water supports the body, allowing you to strengthen muscles without stressing joints, according to U.S. Masters Swimming. “The nice thing about the pool is it takes a lot of compression off your spine,” Boehme says. She suggests treading water if you can or using a flotation device to mimic bicycling or jogging in the water.

7. Avoid High-Impact Activities if They Hurt

Movement is good. If you enjoy running, go for a run. But if it causes pain, take it down a notch to an elliptical machine or walking — or get back in the pool. Just moving is the key. Each joint has joint fluid, and every minute you’re moving you are lubricating your joints. Low-impact activities that combine mobility, strengthening, and functional training may be the best choice for people with ankylosing spondylitis, according to the Spondylitis Association of America.

8. Lose Weight if You’re Overweight

It’s a simple equation — the more you weigh, the more stress you put on your joints, including your hips. Losing excess weight can lighten the load on your hips, helping to ease pain. In addition, losing weight can also lessen inflammation, says Dr. Davis. Ask your doctor what your target weight should be and for advice on losing weight in a healthy way.

9. Work With a Physical Therapist

A physical therapist can be a great partner as you navigate your condition. He or she can evaluate your strengths and weaknesses and tailor a program to help you manage pain and stiffness. You can also ask your physical therapist about such things as what sleep positions are best to help manage hip pain. The ultimate goal is for you to be independent. “I always tell people my role is to guide you and show you what to do,” Boehme says, “but I don’t want to see you forever.”