Sayyiduna Abu Sa'id Khudri (may Allah be pleased with him) narrates that the Prophet Muhammad (peace and blessings be upon him) said: "The deceased will be resurrected in the same clothes in which he passed away."
(Imam Ibn Hibban, may Allah have mercy on him, says:) The statement of the Prophet Muhammad (peace and blessings be upon him): The deceased will be resurrected in the same clothes in which he passed away—by this, he meant the deeds of the deceased. As Allah Almighty has said: "And purify your garments," by this is meant to purify and correct your deeds. It does not mean that the deceased will be resurrected in the same clothes in which he passed away, because in all the narrations, it is explicitly mentioned from the Prophet Muhammad (peace and blessings be upon him) that people will be raised on the Day of Resurrection barefoot, naked, and uncircumcised.