I searched for the Messenger of Allah ﷺ and slipped my hand into his hair.He said, "Your devil has come to you."I asked, "Do you have a devil too?"He replied, "Yes, but Allah helped me against him, so he submitted."
التمست رسول الله ﷺ فأدخلت يدي في شعره. فقال: قد جاءك شيطانك فقلت: أما لك شيطان؟ قال: بلى ولكن الله أعانني عليه فأسلم.
Nasai (3960) narrated it from Qutayba, who said, "Layth narrated to us, from Yahya, that is Ibn Saeed Ansari, from Ubada bin Walid bin Ubada bin Samit, that Ayesha said," then he mentioned it. Its isnad is sahih.Her saying, "I put my hand into his hair," meant she wanted to know whether it was wet from ghusl or not. And his saying, "Your devil has come to you," means it cast into your mind the thought that I had gone to one of my other wives during your turn and your night.