Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him) narrates: The Prophet Muhammad (peace and blessings be upon him) used to observe i'tikaf during the last ten days of Ramadan. Once, he traveled and did not observe i'tikaf. When the next year came, he observed i'tikaf for twenty days.
Hadith Referenceصحیح ابن حبان / كتاب الصوم / 3663
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - انظر ما قبله.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم