Mind you, I'm not a mother, but I've worked with a few.
I'm guessing most places have paid and unpaid maternity leave, or something similar to that. You get paid for a certain number of weeks, total, but there's a second number of maximum weeks you can take. For the managers in my company, you get 6 weeks paid maternity leave. My boss took the six, and cashed out two weeks of vacation too.
But I imagine it can start the minute your doctor says "no more work for you" and puts you on bedrest. And it lasts until you run out of time, in which case someone contacts you, or you approach work about coming back.
Does that help any?