I think the answer is no but just in case…
I work full time for Company A. I’ll soon be on enhanced maternity leave for six months, then SMP for three months, then unpaid for two months (I can’t afford the third month unpaid so will go back to work after eleven months off).
A couple of times a year I do a day of paid work for Company B. This is an entirely separate business to Company A but they know about it and are happy for me to do it in ‘work time’ and be paid for it. (in other words, they don’t make me take annual leave to do the work or anything like that.) Company B pay me for these odd days through PAYE.
Company B have asked if I can do a couple of days for them again next year. One of the days will be in my enhanced six months of maternity pay from Company A, and one of the days will be in the SMP period.
To be honest, it may be at that point that I have no interest in doing the work for them! But in theory, would it be allowed from an HMRC point of view?