I reckon the prostate operation mentioned is transurethral prostatectomy. The hospital stay for an uneventful operation is usually within a week. The urethra can be damaged mechanically by the instrument and / or thermally by the electrical current for cutting the prostate and haemostasis. Straining at urination and stool should be avoided because this can cause bleeding before healing is complete. Walking or climbing stairs leisurely is not an issue. A four-week leave is a good reference but the post-operative progress has the final say. Sedentary work and easy access to toilet at the work place can also substantially reduce the duration of sick leave.