TMI constipation

Is it safe to take milk of magnesia while pregnant? I need a little relief.