Yes. Days where you are not working due to being on sick leave/maternity leave do not create a ‘significant break’ from your employment, providing you would have been working outside the UK on these days if you had not been on leave.
You should however note that if the days in question were spent back in the UK, these days of presence would count towards the permitted annual limits (i.e. the maximum of 90 midnights spent in the UK) unless your presence in the UK during your ‘sick leave’ was due to sickness or injury that prevented you from leaving the UK and could be disregarded under ‘exceptional circumstances’ rules.