Yahya related to me from Malik from Abdullah ibn Abi Bakr ibn Amr ibn Hazm that he had heard Abbad ibn Tamim say that he had heard Abdullah ibn Zayd al-Mazini say, "The Messenger of Allah ﷺ came out to the place of prayer and asked for rain, and when he faced the qibla he turned his cloak inside out."
Malik was asked how many rakas there were in the prayer of asking for rain and he said, "Two rakas, and the imam does the prayer before he gives the khutba. He prays two rakas, and then he gives a khutba and makes dua, facing the qibla and turning his cloak inside out. He recites out loud in both rakas, and when he turns his cloak inside out he puts what is on his right on his left, and what is on his left on his right, and all the people turn their cloaks inside out when the imam does so, and face the qibla, sitting."
خَرَجَ رَسُولُ اللَّهِ ﷺ إِلَى الْمُصَلَّى فَاسْتَسْقَى وَحَوَّلَ رِدَاءَهُ حِينَ اسْتَقْبَلَ الْقِبْلَةَ۔
قالَ يَحْيى، وسُئِلَ مالِكٌ، عَنْ صَلاَةِ الاِسْتِسْقاءِ كَمْ هِيَ؟ فَقالَ: رَكْعَتانِ. ولَكِنْ يَبْدَأُ الإمامُ بِالصَّلاَةِ قَبْلَ الخُطْبَةِ. فَيُصَلِّي رَكْعَتَيْنِ. ثُمَّ يَخْطُبُ قائِمًا ويَدْعُو. ويَسْتَقْبِلُ القِبْلَةَ، ويُحَوِّلُ رِداءَهُ حِينَ يَسْتَقْبِلُ القَبْلَةَ. ويَجْهَرُ فِي الرَّكْعَتَيْنِ بِالقِراءَةِ. وإذا حَوَّلَ رِداءَهُ، جَعَلَ الَّذِي عَلى يَمِينِهِ عَلى شِمالِهِ. والَّذِي عَلى شِمالِهِ عَلى يَمِينِهِ. ويُحَوِّلُ النّاسُ أرْدِيَتَهُمْ، إذا حَوَّلَ الإمامُ رِداءَهُ. ويَسْتَقْبِلُونَ القِبْلَةَ، وهُمْ قُعُودٌ.