Muwatta Malik, Book 50, Hadith 1718 (In-Book)

Yahya related to me from Malik from Zayd ibn Aslam from Ata ibn Yasar that the Messenger of Allah, may Allah bless him and grant him peace, said, "When the slave is ill, Allah ta'ala sends two angels to him." He said, "They look at what he says to his visitors. If he praises Allah and lauds Him, when they come to him, they take that up to Allah, the Mighty, the Majestic, and He knows best, and He says, 'If I make my slave die, I will make him enter the Garden. If I heal him, I will replace his flesh with better flesh and his blood with better blood and I will efface his evil actions.'"

حَدَّثَنِي عَنْ مَالِكٍ، عَنْ زَيْدِ بْنِ أَسْلَمَ، عَنْ عَطَاءِ بْنِ يَسَارٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا مَرِضَ الْعَبْدُ بَعَثَ اللَّهُ تَعَالَى إِلَيْهِ مَلَكَيْنِ فَقَالَ انْظُرَا مَاذَا يَقُولُ لِعُوَّادِهِ ‏.‏ فَإِنْ هُوَ - إِذَا جَاءُوهُ - حَمِدَ اللَّهَ وَأَثْنَى عَلَيْهِ رَفَعَا ذَلِكَ إِلَى اللَّهِ عَزَّ وَجَلَّ - وَهُوَ أَعْلَمُ - فَيَقُولُ لِعَبْدِي عَلَىَّ إِنْ تَوَفَّيْتُهُ أَنْ أُدْخِلَهُ الْجَنَّةَ وَإِنْ أَنَا شَفَيْتُهُ أَنْ أُبْدِلَ لَهُ لَحْمًا خَيْرًا مِنْ لَحْمِهِ وَدَمًا خَيْرًا مِنْ دَمِهِ وَأَنْ أُكَفِّرَ عَنْهُ سَيِّئَاتِهِ ‏" ‏ ‏.‏

sunnah.com

also referenced under: Book 50, Hadith 5 (USC-MSA)