Anas was asked whether the Prophet ﷺ used to raise his hands in supplication. He replied that on a Friday someone said to him, "Messenger of Allah, the rain has stopped, the land has become barren, and the livestock have perished."He said that the Prophet ﷺ then raised his hands until the whiteness of his armpits could be seen, and prayed for rain. He raised his hands and prayed for rain, and when he raised them there was not a single cloud to be seen in the sky.By the time we had finished the prayer, even a young man whose house was nearby was worried about getting back to his family in time.On the following Friday, people said, "Messenger of Allah, houses have collapsed and travelers have been stranded."The Messenger of Allah ﷺ smiled at how quickly the son of Adam tires of things and said, "O Allah, around us and not upon us." The clouds then cleared away from Madinah.
حدثنا ابن أبي عدي
سئل أنس هل كان النبي ﷺ يرفع يديه فقال قيل له يوم الجمعة يا رسول الله قحط المطر وأجدبت الأرض وهلك المال قال فرفع يديه حتى رأيت بياض إبطيه فاستسقى ولقد رفع يديه فاستسقى ولقد رفع يديه وما نرى في السماء سحابة فلما قضينا الصلاة حتى إن قريب الدار الشاب ليهمه الرجوع إلى أهله قال فلما كانت الجمعة التي تليها قالوا يا رسول الله تهدمت البيوت واحتبست الركبان فتبسم رسول الله ﷺ من سرعة ملالة ابن آدم وقال اللهم حوالينا ولا علينا فتكشطت عن المدينة
Its chain of transmission is sahih. It appears in Bukhari, 2/508, no. 1014 (Fath al-Bari), in the chapter on rain-prayer, on the rain-prayer within his sermon, in Muslim, 2/613, no. 897, in the chapter on supplication, on the rain-prayer, in Abu Dawud, 1/305, no. 1174, in Nasai, 3/160, no. 1515, and in Ibn Majah, 1/404, no. 1269.