Well I may be reading this wrongly but you are coming across as though you wanted to take longer off for maternity leave but have decided you can't afford to do so therefore are planning to get signed off sick for as long as possible to extend your paid time off.
Apologies if that's not the case, but I think you have a moral obligation if you are going to be claiming sick pay from your employer, (paid for by the taxpayer) to be doing everything you can to get yourself better and back to work as soon as possible even if it's on reduced hours or something to start with.
You may fully intend to do this, but as I say you are coming across as someone who is hoping to take advantage of a very generous sick pay scheme to get extended time off and has no intention of going back to work sooner than you absolutely have to.
It may be that your employer doesn't take a very proactive approach to sick pay and will just pay you generously for extended periods of time with no consequences or further investigation, but it may not be that easy. I certainly don't think you should make your plans assuming you will just be signed off for six months no problem.
If you are at the moment supposed to be on maternity leave until November, you will need to give 8 weeks' notice that you want to return sooner than that, even if it is to go immediately off sick. If you bring your return date forward so that you can go off sick, and your doctor then decides by September/October that you are in fact much better and are now fit for work, then you will have to go back, you will no longer have the option of even unpaid maternity leave.
Again I personally think that if you are booked off on maternity leave until November, the fact that you don't feel well enough to go back to work yet is irrelevant because you weren't planning to anyway. I think if you are supposed to be on maternity leave until November, morally if you don't want to go back before then anyway you should wait until then, see how you are feeling and if at that point you don't feel up to going back to work, then get yourself signed off sick.
Yes technically you could probably bring forward your return to work date to, say, 8 weeks time, then the week before you are supposed to be back at work, then suddenly decide that actually you are not feeling well enough and get signed off sick instead. I think if you have no intention of going back early, then bringing your return date forward so that you can start claiming sick pay is a bit off.
As I say, I may be misreading or misjudging you, in which case I apologise. As well as having a generous sick pay scheme it's entirely likely that your employer is not as cynical as I am!