Magnesium glycinate (and I think magnesium oxide) are known for loosening the stools and the way they do that is by MOVING LIQUID INTO THE BOWELS. It also really helps with sleep (or can). 600 mg before bed.
Is your stool still yellow (instead of brown)? I was just reading about how that is due to the bile not arriving in the intestine which can mean a bile duct blockage which causes digestion to be bad and bad intestinal bacterial will flourish.