Sayyidah Aishah (may Allah be pleased with her) narrates that the Prophet (peace and blessings be upon him) used to perform i'tikaf in the last ten days of Ramadan until Allah took him in death; then his wives performed i'tikaf after him (peace and blessings be upon him).
The sunnah of i'tikaf is that the mu'takif does not go out except for an unavoidable need, does not visit the sick, does not touch a woman nor have intimate relations, and does not perform i'tikaf except in a congregational mosque; and it is also for the mu'takif that he fasts.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8593