عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو رَضِيَ اللَّهُ عَنْهُمَا عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ مَا أَحَدٌ مِنَ النَّاسِ يُصَابُ بِبَلَاءٍ فِي جَسَدِهِ إِلَّا أَمَرَ اللَّهُ عَزَّ وَجَلَّ الْمَلَائِكَةَ الَّذِينَ يَحْفَظُونَهُ فَقَالَ اكْتُبُوا لِعَبْدِي كُلَّ يَوْمٍ وَلَيْلَةٍ مَا كَانَ يَعْمَلُ مِنْ خَيْرٍ مَا كَانَ فِي وِثَاقِي
It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him) said: When a person suffers any pain in his body, Allah Almighty commands the angels who watch over him to continue recording the good deeds that My servant used to do day and night, until he is released from My confinement.
وَعَنْهُ أَيْضًا قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ إِنَّ الْعَبْدَ إِذَا كَانَ عَلَى طَرِيقَةٍ حَسَنَةٍ مِنَ الْعِبَادَةِ ثُمَّ مَرِضَ قِيلَ لِلْمَلَكِ الْمُوَكَّلِ بِهِ اكْتُبْ لَهُ مِثْلَ عَمَلِهِ إِذَا كَانَ طَلِيقًا حَتَّى أُطْلِقَهُ أَوْ أَكْفِتَهُ إِلَيَّ
It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him and his family) said: Verily, when a servant is proceeding well in worship and then falls ill, the appointed angel is told: Continue to record for him the same deeds that he used to do when he was healthy, until I grant him health again or cause him to die.
عَنْ عُقْبَةَ بْنِ عَامِرٍ رَضِيَ اللَّهُ عَنْهُ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ أَنَّهُ قَالَ لَيْسَ مِنْ عَمَلِ يَوْمٍ إِلَّا وَهُوَ يُخْتَمُ عَلَيْهِ فَإِذَا مَرِضَ الْمُؤْمِنُ قَالَتِ الْمَلَائِكَةُ يَا رَبَّنَا عَبْدُكَ فُلَانٌ قَدْ حَبَسْتَهُ فَيَقُولُ الرَّبُّ عَزَّ وَجَلَّ اخْتِمُوا لَهُ عَلَى مِثْلِ عَمَلِهِ حَتَّى يَبْرَأَ أَوْ يَمُوتَ
Sayyiduna Uqbah bin Amir (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) said: The deeds of every day are concluded with that day itself, but when a believer falls ill, the angels say: O our Lord! You have restrained Your such-and-such servant (from action), (so what should be done about his deeds)? Allah Almighty says: You continue to conclude his days upon the same deeds that he used to do, until he recovers or passes away.
عَنْ أَنَسِ بْنِ مَالِكٍ رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ إِذَا ابْتَلَى اللَّهُ الْعَبْدَ الْمُسْلِمَ بِبَلَاءٍ فِي جَسَدِهِ قَالَ اللَّهُ اكْتُبْ لَهُ صَالِحَ عَمَلِهِ الَّذِي كَانَ يَعْمَلُهُ فَإِنْ شَفَاهُ غَسَلَهُ وَطَهَّرَهُ وَإِنْ قَبَضَهُ غَفَرَ لَهُ وَرَحِمَهُ
It is narrated from Sayyiduna Anas bin Malik, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: When Allah Almighty tests any Muslim servant with physical affliction, He says to the angel: This man used to do good deeds, so record them for him. If He grants him recovery, He will cleanse and purify him, and if He causes him to die, He will forgive him and have mercy on him.