You can start out with over the counter stool softeners, and laxatives. Pain killers are notoriously constipating, and liquid diets, like Ensure etc. are protein rich and fiber low, so they also contribute to the problem. Lack of movement and exercise plays a role as well, though nobody is going to change this part of it all since all we want to do when going through treatmenst is sleep...
There may come a time when prescription laxatives are necessary, get them early and have them ready. This is just one more of the crappy, (no pun intended) degrading things you have to deal with as part of normal treatment. If it isn't one thing, it's another.