When the 365 day rule was first implemented, DWP promised that they would make the transfer to income-related ESA as smooth as possible. However, the experience of many claimants has been rather different!
You should receive a letter 8 weeks ahead of time telling you that your time will soon be up. Whether or not you receive this letter, it would be worth you contacting DWP and asking for an ESA3 a few weeks ahead of time.
Nothing on this board constitutes legal advice - always consult a professional about specific problems