When baby arrives, look for opportunities to ease back into fitness. Go for walks with baby. Join a class. Swap gym time with your partner or a friend. Find something that you enjoy and that works for you and your family.
The best time to ease back into fitness after baby arrives is when feeding baby is established, your lochia (postpartum bleeding) is finished and you are getting at least one 4 hour block of sleep and a total of at least 7 hours of sleep daily.
If you have a cesarean birth, you will need to wait until your 6 week postpartum check up to get a verbal clearance from your healthcare provider. Proper rest is important so note the comment about sleep above.