Thereafter, I asked a boon of the lotus-eyed Rama, saying, ‘O slayer of foes, Rama, may I live as long as the history of thy deeds remaineth extant on earth!” Thereupon he said, ‘So be it. O represser of foes, O Bhima, through the grace of Sita also, here all excellent objects of entertainment are supplied to me, whoever abide at this place. Rama reigned for the thousand and ten hundred years. Then he ascended to his own abode.
In plain words: Hanuman says he asked Rama for a gift: to live as long as the story of Rama's deeds is still told on earth, and Rama agreed. Thanks to Sita's blessing, Hanuman is given every comfort where he lives, and Rama later ruled for eleven thousand years before going back to heaven.