If you are married to a UK citizen, you can apply for UK citizenship (naturalisation) as soon as you receive your ILR. You do not have to wait any period of time at all.
The residency requirements for ILR as the spouse of a UK citizen are:
- you hold ILR
- you were physically inside the UK exactly 3 years prior to the date you apply for UK citizenship... for example, if you apply on December 15th 2021, you must be able to show you were in the UK on December 15th 2018.
- you have not been outside the UK for more than 270 days (9 months) in the last 3 years before applying for UK citizenship
- no more than 90 days of those 270 days can have been in the last 12 months before applying
When calculating the number of days you have been outside the UK, you do NOT count the day you left the UK, or the day you returned to the UK, because you were physically in the UK for part of those days. For example, if you left the UK on Monday and you returned on Friday, that would only count as 3 days outside the UK (Tue, Wed and Thu).
There is a bit of leeway on the 270 days though... they will usually disregard up to 300 days if you had a good reason for being outside the UK for those 300 days (i.e. for work)
As long as you have not gone over 270 days in the last 3 years, or 90 days in the last 12 months, there is no need to wait to apply... you can just apply as soon as you are ready.
If you have gone over the 270/90 days, then you just have to wait to apply until enough time has passed that you are back down below 270 days/90 days in the last 3 years/12 months.