Rehabilitation after hip replacement surgery is a gradual process. You'll begin some strengthening exercises as soon as the day after your replacement to prevent muscle atrophy and promote circulation, but will tackle more strenuous exercises as you heal and gain more strength. A group of German researchers reported in a 2010 issue of the "Journal of Bone and Joint Surgery" that cycling, under the right conditions, can be beneficial to recipients of a total hip replacement.
Raise the seat of your stationary bike to a level at which your foot rests on the pedal when your knee is almost completely straight. The American Academy of Orthopaedic Surgeons explains that cycling helps you regain mobility in your hip, but keeping the seat too low might cause you to dangerously over-flex your hip joint during the recovery period.
Pedal backwards to minimize the pressure you put on your hips when you first start to cycle as part of your rehab. The University of California San Diego Health System suggests that you actively pedal with your healing leg and keep your healthy leg on the pedal without using force in order to strengthen your new hip. You may only be able to cycle for a few minutes at a time in the early stages of physical therapy.
Progress to forward cycling once you have been cleared by your doctor or physical therapist to do so. At this point, you should not feel pain when you pedal backwards. Check with your medical care provider to determine if you are ready to ride a regular bike as opposed to stationary bike.
Increase both your cycling time and the resistance level of your cycling as you recover from your hip replacement. The AAOS explains over a month to 6 weeks time, you can increase your biking time to about 30 minutes at least three times weekly.