It is recommended that you do some preoperative exercises (only if it is comfortable to do so). Easy isometrics (muscle tensing exercises) will help maintain the strength of your leg muscles in preparation for postoperative walking.
You will be using your arms often during the postoperative period while moving in bed and with the walker or crutches. Therefore, strengthening your upper body is also important. You can also do general strengthening exercises with small weights. Before starting exercises, please ask your GP or physiotherapist for a guide as to what you can and cannot do.