Milk of magnesia

I am 38 weeks pregnant, and severly constipated. I've had small bowel movements about every 3 days. I have a history of constipation before pregnamcy and milk of magnesia is the only thing that ever helps. I am just really worried it will stimulate my baby's bowels too. I just don't want to hurt him at all, but I reallllly need to clear my body out. Does anyone have any advice on this?