The Messenger of Allah ﷺ said, "Allah the Exalted said, 'When I afflict My believing servant with illness and he does not complain about Me to those who visit him, I release him from his bondage, then I replace his flesh with better flesh and his blood with better blood, and he resumes his deeds anew.'"
قال رسول الله ﷺ: قال الله تعالى: إذا ابتليت عبدي المؤمن، ولم يشكني إلى عواده أطلقته من إساري، ثم أبدلته لحما خيرا من لحمه، ودما خيرا من دمه، ثم يستأنف العمل.
No references are available.
Hakim narrated it (1/348-349) via Abu Bakr Hanafi, who said, Asim bin Muhammad bin Zayd told us, from Saeed bin Abu Saeed Maqburi, from his father, from Abu Hurairah, and he mentioned the same. He said, "Sahih according to the standard of the two Shaykhs."On this subject, there is also a narration from Abu Hurairah as a marfu report, "There is no servant who falls ill with any illness except that Allah commands his recording angel that whatever bad deed he does should not be written down, and whatever good deed he does should be written for him as ten good deeds, and that he should be credited with the righteous deeds he used to do while healthy, even if he does not do them now."Abu Yaala narrated it (6607, Athari edition) from Salih bin Malik, who said, Abdul-Ala bin Abu Masawir told us, Muhammad bin Amr bin Ata told us, from Abu Hurairah, and he mentioned the same.Haythami said in Majma (2/304), "It contains Abdul-Ala, and he is daif."