Abdullah bin Amr bin As reported,

The Messenger of Allah ﷺ said, "When a servant is following a good path of worship and then falls ill, it is said to the angel assigned to him, 'Record for him the equivalent of the deeds he used to perform when he was free of illness, until I release him or take him to Me.'"

Azami 3389

Hasan

عن عبد الله بن عمرو، قال

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

الأعظمي 3389حسن
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 3389 (2nd edition)
Azami 3389