Had both knees replaced June 2015, same time. Spent three days in hospital and 12 in rehab. What they don't tell you is the primary dangers are blood clotting and infection, so picking the best hospital is key, then find a practitioner there. My surgeon did 7 knees that week.
BTW they will probably give you opioids. I only took them when doing physical therapy the first few days. For me Tylanol and ice worked just as well. I kept the prescription locked in a safe.
It's important to do the exercises because your range of motion is so diminished by the worn joint. My original left knee would only bend to 100. I got 110 on the replacement pretty quickly and a friend urged me to keep going. He has 145 degrees, I'm at 130 or better in both. Still doing exercises every day. An exercise bike really helps, pretty cheap off CL. It's not the knee joint that's stiff, it's the muscles and other connective tissue.
It's important to pick a top specialist. Had my knees done at New England Baptist, an orthopedics-only hospital. About 30% of their surgeries are repairs of surgeries done elsewhere. I met people there from Maine to Florida.
The swelling can be bad. Knee surgery is more like carpentry than surgery, so your body responds to the trauma. My swelling peaked at 6 days.
I play hockey 3 times a week in season at Redford Arena in an Over 60 league. About a third of the guys here have had 1 or BOTH knees replaced and also hips (a bad knee usually causes unusual loads on a hip joint). And they skate better than me.
Champions. Three knees and a hip between us. Hockeytown, Melrose MA.