Having helped hundreds of people to get home after a knee replacement, I have noticed certain factors obviously affect the ease of recovery.
Weight is important. It is easy to put on a few extra pounds when every step hurts. You are less likely to remain active while your eating remains about the same. Extra weight puts more stress on the knees and also make recovering from surgery more difficult.
Attitude is important. Motivated people handle the discomfort immediately post-op better and realize that the best time to get the knee moving is in the first few days, despite the pain.
Pain relief is important. Skilled doctors, sympathetic to their patients needs can greatly affect the short term outcomes through effective pain relief. The number one reason for slow recovery is pain. Take this away or control it and results improve dramatically.
Quadriceps strength is important. Your quads straighten the knee, keep you upright, and support the knee joint. It is normal for the quads to become weaker over time with osteoarthritis as pain leads to less activity and results in the associated loss of strength.
Any improvement in quads strength you make in the lead up to a knee replacement will make your recovery easier. The sooner someone is able to lift their leg straight up off the bed, the sooner they are likely to go home. I encourage anyone on a waiting list for a knee replacement to make the most of their time.
Even extremely painful knees can usually find a simple exercise to increase strength.
For some ideas of where to start, see my previous post on exercise here.
If you are considering a knee replacement, your first step should be the introduction of an exercise program. It will be the best thing you have ever done for your knee.