That news appears in Arthritis & Rheumatism.
Researchers included Daniel Rooks, ScD, of Harvard Medical School, Boston's New England Baptist Hospital, and Beth Israel Deaconess Medical Center.
Rook and colleagues studied 108 men and women scheduled for total hip ordue to severe at Boston's New England Baptist Hospital. Patients were typically in their late 50s to late 60s.
The researchers randomly split them into two groups.
Patients in one group followed a six-week exercise program before their operation.
For comparison, the other patients weren't asked to exercise before surgery.
You might think exercise is the last thing someone should do if they need a new hip or knee.
But getting stronger is often helpful, as long as the patient doesn't overdo it and gets a doctor's approval first.
Rooks' team made sure the patients' workouts, done three times weekly for six weeks, were sensible.
For the first three weeks, patients in the exercise group worked out in a pool; water workouts are easy on the joints.
For the last three weeks, patients exercised in a gym on recumbent stationary bikes or elliptical machines. Those workouts don't pound the joints.
Patients also did strength training and stretches for flexibility during the program's last three weeks.
A physical therapist supervised the workouts, which lasted 30-60 minutes and were held at a community fitness facility.
Before anyone broke a sweat, all the patients rated their ability to do normal chores and activities. They also took tests of their balance, mobility, and leg strength.
They repeated those tests right before surgery, and again afterwards.
As expected, patients in the workout group got stronger while those in the comparison group didn't.
Also, after surgery, the exercisers were much less likely than the nonexercisers to need to go to an inpatient rehabilitation facility instead of going home.
Sixty-five percent of the exercisers went straight home, compared to 44% of the nonexercisers, the study shows.
Exercisers who got total hip replacement also showed a significant advantage in their presurgery function -- based on their own ratings of their ability to handle routine activities -- compared to the nonexercisers.
However, no such function benefit was seen in exercisers who had their knees replaced.
The reasons for that aren't clear, the researchers note, although they say the difference may be related to the joint location. A longer period of exercise may be needed to help knee function, the researchers write.
"Our findings show that an appropriately designed program of water and land-based exercise involving cardiovascular, strength training, and flexibility activities can be a safe, tolerable, and effective approach to improving muscle strength in middle-aged and older adults with severe osteoarthritis of the hip and knee," write Rooks and colleagues.