You can hand in your notice at any point, however if you are on Maternity Leave there are some things to consider. Do you intend to give you notice in when you leave work to go on Maternity Leave? If so, once your notice has been 'spent' your employer will not pay you for your Maternity Leave and you will need to go about applying for whatever entitlement you may be eligible for via other routes ie benefits. If you are planning to hand in your notice at the end of your Maternity Leave you may be required to pay back your OML payments to your employer - there's a question about this a few posts down.