Chapter 15: The Book of I'tikaf
Abdullah b. Umar (Allah be pleased with both of them) reported that the Messenger of Allah (ﷺ) used to observe i' tikaf in the last ten days of Ramadan. Nafi' said: Abdullah (Allah be pleased with him) showed me the place in the mosque where the Messenger of Allah (ﷺ) used to observe i' tikaf.
Sahih Muslim 1171b