Sunan Abi Dawud Book 14, Hadith 154
The Prophet (ﷺ) used to observe I'tikaf during ten days of Ramadan every year. But when the year in which he died, he observed I'tikaf for twenty days.
The Prophet (ﷺ) used to observe I'tikaf during the last ten days of Ramadan. Nafi' said: 'Abd Allah (b. 'Umar) showed me the place in the mosque where Messenger of Allah (ﷺ) used to observe I'tikaf.
When the Messenger of Allah (ﷺ) observed I'tikaf, he would put his head near me, and I would comb it. and he entered the house only to fulfill human needs (i.e. to urinate or to relieve himself).