Whenever the Prophet ﷺ was a resident, he would observe spiritual retreat during the last ten days of Ramadan, and whenever he was traveling, he would observe twenty days of retreat the following year.Ubayy said, "I did not hear this hadith except from Ibn Abu Adi, from Humayd, from Anas."
حدثنا ابن أبي عدي عن حميد
كان النبي ﷺ إذا كان مقيما اعتكف العشر الأواخر من رمضان وإذا سافر اعتكف من العام المقبل عشرين قال أبي لم أسمع هذا الحديث إلا من ابن أبي عدي عن حميد عن أنس