It is narrated from the father of Ibn Ajlan (Ajlan) that Sayyiduna Abu Hurayrah (may Allah be pleased with him) came to me while I was overcome by the severity of illness, and he asked: "Has your companion prayed?" The people said: Yes. Then he said: "Know well! I have been informed that whenever any servant falls ill, Allah Almighty keeps recording for him the same (good) deeds that he used to do in his state of health, until Allah Almighty takes his soul or grants him recovery from the illness." This chain is mawquf (stopping at the Companion), and all its narrators are thiqat (trustworthy).
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب الطب / 3843