When the Prophet ﷺ came out of the toilet, he would say, "Praise be to Allah who has removed harm from me and granted me well-being."
حدثنا هارون بن إسحق حدثنا عبد الرحمن المحاربي عن إسمعيل بن مسلم عن الحسن وقتادة
كان النبي ﷺ إذا خرج من الخلاء قال الحمد لله الذي أذهب عني الأذى وعافاني
No references are available.
Sourcing, its chain of transmission is daif. Busiri said, this is a daif chain of transmission. Ismail bin Muslim Makki is daif in hadith (Taqrib), and it has other defects. It has a daif corroborating narration in Ibn Sunni, no. 22, and elsewhere.