One of the best ways to prevent surgical complications like swelling, infections, skin breakdown, respiratory issues like pneumonia and blood clots is a very simple solution.
You have to get moving early on in your recovery.
Even in some of the more invasive procedures like spinal fusion and knee replacements, in general, you are up and out of bed the day or day after surgery. Long gone are the days of lying in a hospital bed until you feel better. The sooner you get moving the less risk for complications listed above. Hospitals use early mobilization protocols to improve patient outcomes which may include multiple practitioners visiting bedside not just doctors and nursing staff but physical therapists, occupational therapists, and for some patients respiratory therapists as well. Early mobility can include sitting at the edge of the bed, transferring to a bedside chair, ambulating in the room and beyond depending on ability and any mobility restrictions.
Getting moving early does not need to be complicated. I often like to tell my folks to drink a lot of water all day. This serves a few purposes. Water helps fight dehyration which causes tons of problems on it's own, but wounds also need fluid to heal. Drinking water also helps to make sure the lymphatic fluid stays viscous to keep your swelling more managable. One of the best reasons to drinks lots of water is to force more movement while you are getting up to use the bathroom. While you're up; take a lap around the house, go get something in another room you thought of why you were laying around. Do a little bit of activity every hour you are not asleep. This ensures that getting blood pumping, lungs moving and those muscle being activated.
Focus on a few key things.
Pump your muscles, even if you don't/can't get up right now.
Everything that moves should be moved
You can expect to have some good and bad days but don't stop doing what you can.
You can find more info like this in my book Healthy Healing After Surgery
Or take advantage in a Home Exercise Program and Nutrition recommendations as part of the Healing Bundle which includes a video chat to make sure you are doing the right thing for your body and procedure.