When you have surgery for arthritis, you’ll need to start working on your recovery before you even leave the hospital. In fact, there are several milestones to achieve in the hospital before your doctor will consider you ready to go home.

These include getting in and out of bed, walking with crutches or a walker, moving your joint (bending and straightening your knee, for example), climbing a few stairs, and being able to do your recovery exercises. Your hospital stay will vary depending on the surgery and your own circumstances, but it’s typical to stay about three to seven days for total knee replacement and up to 10 days for total hip replacement.

It’s important to begin moving your joints soon after surgery to regain your strength and promote healing. To help you regain movement in your legs, your doctor may have you use a continuous passive motion machine (CPM) – a device that carefully moves the limb for you. The machine will gently bend and straighten your leg, and a nurse or physical therapist will set the machine to move a specified amount and speed. Your surgeon or therapist will prescribe certain movements for you. The machine keeps your leg elevated to reduce swelling and aids circulation.

In addition to the CPM machine, a physical therapist will come to see you in the hospital to begin your recovery exercises. You will work on exercises to rotate and pump your ankles to move blood through your legs. Plus there are other exercises you can do to move your knee or hip and regain strength in your large leg muscles.

In addition, you will begin to walk in the hospital, usually with the help of a walker or crutches. In your pre-surgery planning, find out whether the hospital will arrange for this equipment or whether you have to make arrangements for it. Before your surgery, you should also explore what type of equipment your insurance policy will cover – either rental or purchase. A physical therapist can show you how to move properly with your crutches or walker.

When you have achieved the necessary goals, and your doctor has confirmed that you are free of infection or other complications, you’ll be ready to go home. Once you’re at home, the rest of your recovery and rehabilitation process will begin. It will be hard work, but the end result will be more mobility, less pain, and greater freedom to do the activities you love.