This is a common question in pregnancy. However, it is one without an easy answer, as it will vary from person to person. Some women work up until labor occurs while other women may stop sooner. Every woman and every pregnancy is different.
If you work for a covered employer, some of your time off will be protected by the Family and Medical Leave Act (FMLA) which allows you to take up to 12 weeks off of your job without pay. If you stop working earlier before the baby comes that will mean you will have to go back sooner after the baby is delivered. It is a personal and individual choice but we encourage you to hold off as long as possible to maximize time with you and the baby after delivery.
Depending on your employer and insurance, many individuals are eligible for paid time off during part of this time through short term disability. For maternity leave, this is typically 6 weeks regardless of method of delivery. Any extensions of your maternity leave longer than 6 weeks must be considered medically necessary to be covered by your insurance. We recommend that you contact your insurance company to fully understand your benefits.
It is also a good idea to talk to your boss about your pregnancy and planned maternity leave. This allows you to both prepare for your absence from work, as well as see if any additional time off and/or benefits are available to you from your employer.