Maliks Muwatta Book 50, Hadith Number 5.

Section : The Reward of the Invalid.

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.'”