Miralax and Colace

Has anyone been told to take these two for constipation? Safe? OB triage nurse told me it was okay to take but I don’t know.