when best time to take maternity leave ?

I am currently 20 weeks pregnant and work on a busy ward in a hospital as it's coming up I have to start thinking about maternity leave when I want it to start as I have no idea when the best time is I can start it from 29 weeks I have been having problems with pains and long days as I have todo naily 13 hour days but have no idea when to start it what do people think is best time ?