Assalamualaikum w.b.t. What is the kaifiat or methodology to perform the prostration of gratitude? Is it necessary for a person who wants to perform the prostration of gratitude to first perform the ablution and face the qibla? Hope for an explanation.
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
Definition of gratitude
Gratitude is the acknowledgement of a blessing from one’s Lord and praising Him. In truth, displaying the effects of the blessings on one’s tongue, heart and body parts where the tongue praises, heart acknowledges and body parts follow whatever He loves.  The terminology gratitude means a slave utilizing the blessings of Allah SWT for him by obeying Him. 
Whereas the definition of prostration of gratitude is a prostration a person performs when he is granted a blessing or saved from harm. 
Scholars have differing opinions (khilaf) regarding the prostration of gratitude as the following:
- First opinion: It is not sanctioned. This is the opinion of Abu Hanifah, Malik in a famous opinion and al-Nakha’ie followed what is stated by Ibn al-Munzir.
- Second opinion: It is sanctioned and sunnah. This is the opinion of Imam al-Syafi’e, Ahmad, Ishaq, Abu Thaur, Ibn al-Munzir, Abu Yusuf, Muhammad Ibn Habib from madhhab Maliki and Ibn Qassar said that it is from Imam Malik and this is tashih by al-Banani.
The evidence for the prostration of gratitude
The evidence that proves the sanctioning of the prostration of gratitude is based on the hadith of the Prophet PBUH from Abu Bakrah RA, he said:
أَنَّهُ كَانَ إِذَا جَاءَهُ أَمْرُ سُرُورٍ أَوْ بُشِّرَ بِهِ خَرَّ سَاجِدًا شَاكِرًا لِلَّهِ
“When anything came to the Prophet (ﷺ) which caused pleasure (or, by which he was made glad), he prostrated himself in gratitude to Allah.” 
Among the arguments are based on a hadith from Abu Bakrah RA where he said:
أَنَّ النَّبِيَّ صَلَّى الله عَليْهِ وسَلَّمَ كَانَ إِذَا أَتَاهُ أَمْرٌ يَسُرُّهُ أَوْ بُشِّرَ بِهِ ، خَرَّ سَاجِدًا ، شُكْرًا لِلَّهِ تَبَارَكَ وَتَعَالَى
“When the Prophet (ﷺ) heard the news that made him happy, or for which one should be happy, he would fall down prostrate in gratitude to Allah, the Blessed and Exalted.” 
In another narration, also from Abu Bakrah RA, he said:
اَنَّ النَّبِىَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ كَانَ اِذَا جَاءَهُ خَبَرٌ يَسُرُّهُ خَرَّ سَاجِدًا للهِ
“Whenever the Prophet (ﷺ) received a matter which pleased him he used to prostrate to Allah [out of thankfulness].” 
Likewise, it is also narrated from the companions where they would perform the prostration of gratitude when they receive good news. For example, it is narrated that Abu Bakar RA prostrated in gratitude when he heard the news of the opening of Yamamah and the killing of Musailamah al-Kazzab. The same when Ali RA prostrated being grateful when he heard that Dzu al-Thudayyah from the Khawarij was killed. Next, it is recorded that Ka’ab bin Malik performed the prostration of gratitude when he was informed that his repentance was accepted by Allah SWT.
It is Sunnah to perform the prostration of gratitude when one receives a blessing from Allah SWT such as the birth of a child, receiving wealth, being promoted, getting a great result in an exam and others. Likewise, it is also sunnah to perform the prostration of gratitude when one is saved from any harm and calamity such as when one is saved from an accident, earthquake and other harmful incidents.
As explained, this is the opinion of al-Syafie (as well as supporters of madhhab Syafi’e), Ahmad bin Hanbal (and the supporters of madhhab Hanbali), Ishak, Abu Thuar and Ibn al-Munzir. As for al-Nakha’ie, Malik and Abu Hanifah, they are of the opinion that the prostration of gratitude is makruh.  However, some of the Malikiyyah scholars said that it is sunnah to perform the prostration of gratitude.
Kaifiyat and methodology of the prostration of gratitude
In fiqh Syafi’e and Hanbali books, the methodology or kaifiyat of prostration of gratitude is described to be the same as the tilawah prostration outside of prayer. Hence, those who intend to perform the prostration of gratitude must be in a pure state (performed the ablution), covers the awrah, clean and pure from any najis from one’s body, clothes and place of prostration as well as face the qibla. 
The practical way of performing the prostration of gratitude is as the following:
- First, one must set the intention to perform the prostration of gratitude.
- Then perform the takbir the same as takbiratul ihram by holding up one’s hands, for it is analogically deduced (qiyas) with prayer.
- Then perform another takbir without holding up the hands where this takbir is for the person to go down in prostration.
- Then perform the prostration the same as the prostration in prayer. As for the recitation during the prostration, it is the same as the prostration in prayer and then tahmid can be added praising Allah SWT for His blessings granted by Him.
- Next, come back up from prostration (into a sitting position) and gives the salam. It is not conditioned to recite the tasyahhud and it is also not sunnah to recite it. 
Prostration of gratitude without ablution and not facing the qibla
Other than the kaifiyat mentioned in the previous discussion, there is also a discussion among scholars regarding the prostration of gratitude without ablution and not facing the qibla. This is the opinion of most salaf scholars and some Malikyyah scholars.  Likewise, it is the opinion of the muhaqqiq such as Ibn Jarir al-Tabari, Syeikh al-Islam Ibn Taimiyyah , Ibn al-Qayyim , al-Syaukani  and al-San’ani. 
For those with the same opinion, the following are the reasons and justification that supported their opinion:
- The opinion that states that the prostration of gratitude needs ablution should present their evidence. Analogically deducing (qiyas) the prostration of gratitude with prayer is inaccurate because prostration of gratitude is a prostration, unlike a prayer.
- The apparent from the hadith of Abu Bakrah RA describes that the Prophet PBUH immediately prostrated in gratitude when he receives happy news. It isn’t mentioned the necessity of ablution. If it needs ablution then certainly the Prophet PBUH would explain it, rather the hadith recorded that the Prophet PBUH immediately prostrated when he received good news.
- Prostration of gratitude is performed when one receives a blessing or is saved from harm as a sign of gratitude to Allah SWT. It is performed immediately. If it calls for a person to first perform ablution, surely, it cannot be performed immediately because one will have to find water, determine the direction of qibla and then he can perform the prostration of gratitude. This could remove the secret meaning that the prostration of gratitude is sanctioned itself.
We see in this issue the closer opinion is the opinion that states the prostration of gratitude can be performed without ablution or facing the qibla. This considering there isn’t any determining evidence of the necessity of ablution and facing the qibla.
It may be possible for a person who receives happy news that he just had a child, he passed an exam or was promoted to immediately prostrate in showcasing his gratitude to Allah SWT. Likewise, those who are saved from an accident, or cured of a disease, can immediately prostrate to showcase their gratefulness and relief of being saved from the calamity that fell on them.
If one chooses to practise with the opinion that one has to perform the ablution and face the qibla, then it is also not a problem, for this issue is an intellectual dialogue and open to further discussion.
Hopefully, with this explanation, we can better understand the prostration of gratitude and the main point is to practice it.
 See Madarij al-Salikin, 2/244
 See Hasyiah al-Syabramalisi, 1/22
 See Syarh al-Minhaj and Hasyiah al-Qalyubi, 1/208
 Narrated by Abu Daud (2774)
 Narrated by Ibn Majah (1394)
 Narrated by Abu Daud (2774)
 See al-Mughni, 1/449 dan al-Majmu’, 4/70
 See al-Majmu’, 4/63
 See al-Mu’tamad fi al-Fiqh al-Syafi’e, 1/358
 See Mawahib al-Jalil fi Syarh Mukhtasar al-Khalil, 2/62
 See al-Fatawa al-Kubra, 5/340
 See Tahzib Sunan, 1/69
 See Nail al-Autar, 3/127
 See Subul al-Salam, 1/315