When knee pain strikes, your first instinct may be to rest. But you may actually need the exact opposite.

“Appropriate exercise can help with pain and knee function for almost all knee conditions,” says James Kristopher Ware, MD, an orthopedic surgeon at the Bone & Joint Institute at Hartford Hospital.

Here’s some guidance on knee pain and an exercise plan to get you started, according to Dr. Ware.

Is joint replacement right for me?

Start hereCall 833.203.9880

Knee pain has dozens of causes. Here are some common ones.

Dr. Ware shares some of the most common causes of knee pain:

  1. Runner’s knee (patellofemoral pain syndrome) can happen when there is too much stress between the kneecap and thigh bone.
  2. Meniscus tears occur when the cartilage between your shin bone and thigh bone tears, causing pain, catching, or locking.
  3. Osteoarthritis results from cartilage wearing down in your knee, leading to stiffness and pain.
  4. Patellar tendonitis can happen with repetitive strain on the tendon connecting your kneecap to your shin bone, often affecting athletes who jump a lot.
  5. Ligament tears can occur from serious injury, damaging the knee’s stabilizing ligaments, including those on the sides and inside the knee.

> Related: What NOT to Do When You Have Knee Pain

A few things to consider before exercising.

“If a traumatic injury caused your knee symptoms, you should see your doctor before exercising,” says Dr. Ware.

As another general recommendation, you’ll want to skip impact activities (i.e., running, jumping, deep squats) if you have knee problems.

“Start slowly and carefully with exercise,” advises Dr. Ware. “If any exercises cause more knee pain, skip them and move on. See what aggravates you and temporarily avoid them.”

6 exercises to ease your knee pain

Ready to get some knee pain relief? Here’s your workout plan to do right now:

  1. Straight leg raises: Sit on the floor with your legs extended straight, contract your thigh muscle, and slowly raise your foot with your knee straight 6 inches from the floor. Hold for 5 seconds and lower. Repeat 10 times.
  2. Hamstring curl: Stand with your hands on the back of a chair and bend your knee to 90 degrees. Hold for 5 seconds and slowly lower. Repeat 10 times. Add an ankle weight for increased resistance.
  3. Calf raises: Stand with your hands on the back of a chair and lift both heels as high as possible. Hold for 5 seconds and slowly lower. Repeat 10 times.
  4. Wall slides: Stand with your back to the wall and heels 12 inches from the wall. Slowly lower until your knees are bent approximately 90 degrees. Hold for 5 seconds and repeat 10 times.
  5. Side step-ups: Stand sideways to a step. Place one foot on the step. Slowly rise up, straightening the knee on a step. Lower slowly. Repeat 10 times.
  6. Side-lying hip abduction: Lay on one side and raise your leg with the knee straight. Hold for 5 seconds and repeat 10 times. You can also add an ankle weight for more resistance.

“You can do these simple exercises daily or every other day for the most benefit,” says Dr. Ware. “For more advanced strengthening with higher resistance, you’ll need more time for muscle recovery.”

Want more health news? Text StartHere to 85209 to sign up for text alerts

Still in pain? Call your doctor.

If you notice any knee swelling, redness, or catching/locking, call your doctor.

While knee “cracking” is normal, keep an eye out for any cracking associated with pain, swelling, or a sense of joint instability.

And if you’re not progressing like you should?

“If your knee pain doesn’t improve or gets worse, it’s important to seek medical attention to get appropriate treatment,” answers Dr. Ware.

Don’t forget about preventing knee pain in the first place

While there are many potential causes of knee pain, the best treatment is prevention.

Maintaining strength and flexibility in the ankle, hip and knee can reduce the risk of injury.

“Exercise plays an important role in preventing knee injury,” says Dr. Ware. “Knee exercises can help prevent pain, maintain the normal knee range of motion and strengthen the stabilizing muscles to protect the knee.”