Transitioning pets out of the bedroom

Hi ladies! I wondered if anyone has advice on a smooth transition of your pets out of your bedroom for baby. I have a cat and a dog and they both sleep in our bed at night but once baby is here in 3 months I won’t be having them in the room at all. Not sure how or when to start having them sleep somewhere else? And be ok with it!