Abu Hurairah reported,

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.'"

Azami 3393

Sahih

عن أبي هريرة قال

قال رسول الله ﷺ: قال الله تعالى: إذا ابتليت عبدي المؤمن، ولم يشكني إلى عواده أطلقته من إساري، ثم أبدلته لحما خيرا من لحمه، ودما خيرا من دمه، ثم يستأنف العمل.

الأعظمي 3393صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Patience in tribulation and illness
Section
Sick and the traveler are credited with what they used to do while resident and healthy
Numbering
Jami al-Kamil 3393 (2nd edition)
Azami 3393