Yusuf bin Abi Burdah narrated: I heard my father say: 'I entered upon 'Aishah, and I heard her say: When the Messenger of Allah exited the toilet, he would say: Ghufranaka (I seek Your forgiveness).' (Sahih) Another chain with similar wording.
It was narrated that Anas bin Malik said: Whenever the Prophet exited the toilet, he would say: 'Al-hamdu lillahilladhi adhhaba 'annial-adha wa 'afani (Praise is to Allah Who has relieved me of impurity and given me good health).'