The Prophet ﷺ went to relieve himself, so I placed water for his ablution. When he came out, he asked, "Who put this here?"I said, and in another wording they said, "Ibn Abbas."He said, "O Allah, grant him understanding of religion."
أن النبي ﷺ أتى الخلاء، فوضعت له وضوءا، فلما خرج قال: من وضع هذا؟ قلت: وفي لفظ قالوا ابن عباس، قال: اللهم فقهه.
Bukhari narrated it in the chapter on wudu (143), and Muslim narrated it in the virtues of the companions (2477), both through Hashim bin Qasim, who said, Warqa bin Umar Yashkuri told us, he said, I heard Ubaydullah bin Abu Yazid narrating from Ibn Abbas that the Prophet ﷺ and then he related it. The wording given is that of Muslim, while Bukhari's wording is, "O Allah, grant him understanding of the religion."