After your knee replacement, your doctor will require you to be able to bend your knee to a 90-degree angle and straighten it before you are discharged, so you'll already have some range of motion. Your physical therapist will teach you exercises to do at home that will help you get more movement in the joint and help decrease the pain, but there are some simple exercises you can do in addition that can help you progress more quickly.
Early exercise focus on flexing the joint and coordinating the supportive muscles. Slowly bending your knee while lying in a bed or siting in a chair gets the joint used to movement. Hold the bend for a few seconds, and make the entire movement fluid. Straight leg raises and ankle pumps strengthen the muscles, ligaments and tendons that support your knee, and can help reduce swelling by increasing blood flow and drainage.
Practice walking and climbing stairs with the help of a walker or crutches. It is helpful to have someone with you in the early stages in case you fall. Support your weight evenly, and use the walker or crutches until you are no longer putting weight on them. At this stage, you can switch to using a single crutch or cane on the opposite side from the replaced knee, but stand up straight and try not to favor the new knee. Once you are no longer putting weight on the crutch or cane, you may begin walking unassisted.
Once you are able to walk short distances unassisted, it is important to regain the strength in your leg muscles with resistance exercises. You can do the early rehab exercises with light ankle weights or resistance bands, and you can ride a stationary bike at varying degrees of resistance to strengthen your muscles and work on your range of motion at the same time.
After your doctor gives you the all-clear to exercise, consider taking yoga or tai chi classes. Both are recommended by the Arthritis Foundation as effective range-of-motion exercises, and both focus on slow, controlled movements. Yoga postures have variations to accommodate injuries or varying skill levels, and tai chi has been shown to reduce pain and impairment in people with knee problems. It is important to learn from a professional though, as injury can result from improper form.