Milk of magnesia?

I'm 36+2 weeks pregnant. Iv been pretty constipated for a little over a week. I got some Milk of magnesia. I woke at 4AM or is currently 5:55 pm. My question is how long does the Milk of magnesia take to work? Should I wait till I have a day off the next day? Does it work within a couple hours?