When death approached him, he called for new clothes and put them on. Then he said, "I heard the Messenger of Allah ﷺ say, 'The deceased will be raised up in the clothes in which he dies.'"
أنه لما حضره الموت دعا بثياب جدد فلبسها ثم قال: سمعت رسول الله ﷺ يقول: إن الميت يبعث في ثيابه الذي يموت فيها.
Abu Dawud (3114) narrated it from Hasan bin Ali, who said, Ibn Abu Maryam narrated to us, Yahya bin Ayub informed us, from Ibn Hadi, from Muhammad bin Ibrahim, from Abu Salama, from Abu Saeed Khudri, and he related the hadith in the same manner. Its chain is hasan because of Yahya bin Ayub, who is Ghafiqi, there being disagreement about him, though his hadith is hasan.Ibn Hibban also narrated it in his Sahih (7316), and Hakim (1/340), both from the hadith of Ibn Abu Maryam in the same manner. Hakim said, "Sahih according to the standard of the two Shaykhs (Bukhari and Muslim)." However, Ibn Hibban did not mention the story of Abu Saeed changing his garments at the time of his death. He said, "The meaning of his saying, ﷺ, 'The dead person will be raised...' is that he meant it in reference to his deeds, as in His statement, "and purify your garments" [Muddaththir 74:4], meaning, set right your deeds. It does not mean that the dead person will be raised in the garments in which he was taken in death, since numerous reports make it clear, on the authority of the Chosen One, ﷺ, that people will be gathered on the Day of Resurrection barefoot, naked, and uncircumcised."Khattabi said, Abu Saeed took the hadith according to its apparent meaning, while some scholars interpreted it differently, saying that "garments" means "deeds." He then said, "Some of them said that being raised is different from being gathered, for it is possible that being raised occurs with garments, while being gathered occurs with nakedness and bare feet."