The Messenger of Allah ﷺ sent Usayd bin Hudayr along with several others to search for a necklace belonging to Ayesha that she had forgotten at a place where they had stopped. The time for prayer came while they had no ablution and could find no water, so they prayed without ablution. They mentioned this to the Messenger of Allah ﷺ, and Allah revealed the verse of tayammum.Usayd bin Hudayr said to Ayesha, "May Allah reward you with good. By Allah, no matter has ever befallen you that you disliked except that Allah made it a source of good for you and for the Muslims."
أخبرنا إسحق بن إبراهيم قال أنبأنا أبو معاوية قال حدثنا هشام بن عروة عن أبيه
بعث رسول الله ﷺ أسيد بن حضير وناسا يطلبون قلادة كانت لعائشة نسيتها في منزل نزلته فحضرت الصلاة وليسوا على وضوء ولم يجدوا ماء فصلوا بغير وضوء فذكروا ذلك لرسول الله ﷺ فأنزل الله عز وجل آية التيمم قال أسيد بن حضير جزاك الله خيرا فوالله ما نزل بك أمر تكرهينه إلا جعل الله لك وللمسلمين فيه خيرا
Bukhari transmitted it in the Book of Tayammum, chapter "If he finds neither water nor soil," hadith 336, and elsewhere, and Muslim in the Book of Menstruation, chapter on tayammum, hadith 109/367, from the hadith of Hisham through this route. Abu Dawud transmitted it in the Book of Purification, chapter on tayammum, hadith 317, from the hadith of Abu Muawiya through this route, and it is also found in Al-Kubra, hadith 312.