Retiring to a Mosque for Remembrance of Allah (I'tikaf)
Bukhari :: Book 3 :: Volume 33 :: Hadith 260
Narrated Abu Huraira:
The Prophet used to perform Itikaf every year in the month of Ramadan for ten days, and when it was the year of his death, he stayed in Itikaf for twenty days.