as mranchovy said. But i think if you send the form after the baby is born you may need the birth registration - not sure. I sent my form on the day ds2 was born. Woke up in labour, filled the form and asked dh to go to post office because i couldn't walk by then!
You can download the form here, but you will also need the MATB1 form or a letter from your midwife or doctor.
The cut-off date is 13 weeks after the start of your Maternity Allowance Period so there is no panic; the earliest you can apply is actually 14 weeks before your Expected Week of Childbirth (EWC) which is the week starting on a Sunday in which your baby is due.
I'm a bit confused about the timing for applying for MA. The information I can find suggests that it can be applied for from 15 weeks pre-EDD (I think). This will be before I next see my midwife. Do I need to make a special trip to get the relevant form from them or is it ok to wait until my next visit? I'll be working up until a few days before the due date anyway so probably won't start my 'maternity leave' until the baby arrives anyway! Is there a cut off date by which I have to have applied? I'm quite new to this whole self-employment thing & it's taken me long enough to get my head around registering as self-employed & sorting out my NI payments - it's just all too much for my hormone-addled brain to handle!