I have a problem with constipation from my meds. My doctor has me taking stool softeners and they help a lot. I take two in the morning (after I have had food, otherwise I get sick) and two at night. The doctor said it was perfectly safe to take but I would check with your doctor first. Also, make sure there is no laxative in the pills. Walmart has a generic brand and I have used it for a couple of years with no problems.
Like I said though, please talk to your doctor first. I hope you find a solution that works for you.