Frodo's wound from Shelob (as well as the one he got from the Ringwraiths) continues to hurt him and he realises that he saved Middle Earth for others. He knows that it's time for him to move on to a place where he'll be always happy and safe etc. Yeah, I realise you could say the same for the Shire but I think the point is that it's his 'time'