Call it the Sleep Catch-22: While it’s an essential part of the healing process, getting enough shut-eye can be a challenge for people rehabilitating hips, knees, shoulders, and other joints. Not only might you wake up with pain, but you also might find that your favorite positions are uncomfortable—or even harmful. Here, some general advice about protecting yourself, regardless of your injury. Bring any specific concerns—especially if they involve pain—to your doctor immediately.

If you’re recovering from hip surgery

  • Don’t sleep on the side where the surgery happened.

  • Do place a pillow between your legs if you sleep on your side.

  • Do ask your doctor about an abduction wedge—a type of pillow/brace designed to support a patient’s legs.

If you’re recovering from knee surgery

  • Do keep a pillow under your heel or ankle.

  • Don’t put a pillow under your knee.

  • Do try to stay in a position that keeps your knee straight.

If you’re recovering from shoulder surgery

  • Don’t lie flat.

  • Do raise your upper body onto pillows, if it helps. At the very least, rest your shoulder on a rolled-up towel or a pillow.

  • Do sleep in your sling or brace, as your doctor advises.