I can tell you what I do for this. Everyone is different and not everything we all do works for everyone...that said...
I take Miralax every other day, stool softeners twice a day, as much fiber(fresh fruit and salads) as I can and drink lots of water. I also snack on prunes everyday-they actually taste great and they make some with an orange essence that is really tasty.
I am pretty regular-BM every other day-no straining- which is where I was before surgery and meds. Before I started the miralax and stool softeners I would get constipated and little "balls" would drop out and I had hemmeroids.I hated adding a bunch more to the meds I already take but if I get too backed up I get heart burn/reflux which is very uncomfortable and can make me throw up.
Isn't this a lovely topic? It comes up all the time-everyone has something that works for them. Be consistant! Try and stay ahead of the problem if you can.
Blessings,
Momz