Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "Whenever a servant falls ill, Allah Almighty commands his guardian angel that whatever evil (the servant) does, (the angel) should not record it; whatever good the person does, the angel should record it as ten good deeds; and he should keep recording in his favour the good deeds he used to do before when he was healthy, even if he has not done them (during the illness)."
Abu Ya'la recorded it. Its chain contains a narrator, Abd al-A'la bin Abi al-Musawir, and he is da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الجنائز / 3813