Assalamualaikum ustaz. How does one supplicate so that his prayers are granted and what are the ways Allah SWT accepts our supplication? Hope for an explanation. Thank you.
Waalaikumussalam wrt. wbt.,
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 Final day.
We’ll start with the statement of Allah SWT:
وَقَالَ رَبُّكُمُ ادْعُونِي أَسْتَجِبْ لَكُمْ
And your Lord says, “Call upon Me; I will respond to you.” 
This verse is evidence that shows Allah SWT commanded His slaves to supplicate to Him anything they need and it is also evidence of its sanctioning and there is no khilaf on this matter among the Muslims. 
In Islam, supplication is not a trivial matter, rather it has a huge role. Thus, supplication itself is considered an act of worship. This is as stated in a narration from al-Nu’man bin Basyir where he heard the Prophet PBUH saidsay:
الدُّعَاءُ هُوَ العِبَادَةُ
“Supplication (du’a’) is itself the worship.” 
Furthermore, we as believers should always supplicate to Allah SWT for humans are weak and are always in need to of guidance of from their Creator in all and any situation. Moreover, there are numerous supplications taught by Rasullullah PBUH to us to be made in our daily lives. However, there are matters that we should be mindful of when we are supplicating to ensure that our supplications are accepted and granted by Allah SWT which are the manners in supplication.
Here, we state some of them. Which are:
First, supplication with confidence and hope. This is based on Allah SWT’s statement:
إِنَّهُمْ كَانُوا يُسَارِعُونَ فِي الْخَيْرَاتِ وَيَدْعُونَنَا رَغَبًا وَرَهَبًا
“Indeed, they used to hasten to good deeds and supplicate Us in hope and fear,” 
Hence, Allah SWT will not accept the supplication from a person whose heart isn’t present and elsewhere. Rasullullah PBUH once said:
ادْعُوا اللَّهَ وَأَنْتُمْ مُوقِنُونَ بِالإِجَابَةِ، وَاعْلَمُوا أَنَّ اللَّهَ لَا يَسْتَجِيبُ دُعَاءً مِنْ قَلْبٍ غَافِلٍ لَاهٍ
“Supplicate God when you are assured of being answered, and know that God does not answer a supplication which comes from a careless and inattentive heart.” 
Second, praise Allah SWt SWT before supplicating. This matter can be seen clearly in surah al-Fatihah as He states:
بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ (1) الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ (2) الرَّحْمَٰنِ الرَّحِيمِ (3) مَالِكِ يَوْمِ الدِّينِ (4) إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَعِينُ (5) اهْدِنَا الصِّرَاطَ الْمُسْتَقِيمَ (6) صِرَاطَ الَّذِينَ أَنْعَمْتَ عَلَيْهِمْ غَيْرِ الْمَغْضُوبِ عَلَيْهِمْ وَلَا الضَّالِّينَ
In the name of Allah, the Entirely Merciful, the Especially Merciful. (1) [All] praise is [due] to Allah, Lord of the worlds – (2) The Entirely Merciful, the Especially Merciful, (3) Sovereign of the Day of Recompense. (4) It is You we worship and You we ask for help. (5) Guide us to the straight path – (6) The path of those upon whom You have bestowed favor, not of those who have evoked [Your] anger or of those who are astray. (7) 
If the verses of surah al-Fatihah are analysed, there are five praises for Allah SWT, starting from the first to the fifth verse. Then, the sixth verse and subsequent verses are followed with asking or supplication.
Third, supplicate during the times supplications are granted, among them are:
- In the final third of the night. There is a hadith in a narration Abu Hurairah RA, Rasullullah PBUH said:
يَنْزِلُ رَبُّنَا تَبَارَكَ وَتَعَالَى كُلَّ لَيْلَةٍ إِلَى السَّمَاءِ الدُّنْيَا حِينَ يَبْقَى ثُلُثُ اللَّيْلِ الآخِرُ يَقُولُ: مَنْ يَدْعُونِي، فَأَسْتَجِيبَ لَهُ مَنْ يَسْأَلُنِي فَأُعْطِيَهُ، مَنْ يَسْتَغْفِرُنِي فَأَغْفِرَ لَهُ
“Our Lord who is blessed and exalted descends every night to the lowest heaven when two-thirds of the night have passed and says, “Who supplicates me so that I may answer him? Who asks of me so that I may give to him? Who asks my forgiveness so that I may forgive him?” 
- When fasting. This is stated in a narration from Abu Hurairah RA, the Messenger PBUH said:
ثَلَاثَةٌ لَا تُرَدُّ دَعْوَتُهُمْ، الْإِمَامُ الْعَادِلُ، وَالصَّائِمُ، حَتَّى يُفْطِرَ، وَدَعْوَةُ الْمَظْلُومِ
“There are three whose supplications are not turned back: A just ruler, and a fasting person until he breaks his fast. And, the supplication of one who has been wronged.” 
- On Fridays. This is in accordance with a narration from Abu Hurairah RA, Rasullullah PBUH said:
فِي يَوْمِ الجُمُعَةِ سَاعَةٌ، لاَ يُوَافِقُهَا مُسْلِمٌ، وَهُوَ قَائِمٌ يُصَلِّي يَسْأَلُ اللَّهَ خَيْرًا إِلَّا أَعْطَاهُ
“There is a time in it (Friday) at which no Muslim would stand up while praying and beg Allah, Who is Great and Glorious, for something except that He would give it to him.” 
Fourth, face the qibla when supplicating. This follows most of the actions of the Prophet PBUH. There is a hadith from Abdullah bin Zaid, that said:
خَرَجَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ إِلَى هَذَا المُصَلَّى يَسْتَسْقِي، فَدَعَا وَاسْتَسْقَى، ثُمَّ اسْتَقْبَلَ القِبْلَةَ وَقَلَبَ رِدَاءَهُ
“Allah’s Messenger (ﷺ) went out to this Musalla (praying place) to offer the prayer of Istisqa.’ He invoked Allah for rain and then faced the Qibla and turned his Rida’ (upper garment) inside out.” 
Imam al-Bukhari himself has placed it in a specific chapter in his sahih regarding this matter under the title, “Chapter: Facing the Qibla When Supplicating,” and this hadith is mentioned in this chapter. 
Fifth, avoid eating prohibited wealth and food as stated by the Prophet Muhammad PBUH:
الرَّجُلَ يُطِيلُ السَّفَرَ أَشْعَثَ أَغْبَرَ، يَمُدُّ يَدَيْهِ إِلَى السَّمَاءِ، يَا رَبِّ، يَا رَبِّ، وَمَطْعَمُهُ حَرَامٌ، وَمَشْرَبُهُ حَرَامٌ، وَمَلْبَسُهُ حَرَامٌ، وَغُذِيَ بِالْحَرَامِ، فَأَنَّى يُسْتَجَابُ لِذَلِكَ؟
“A man who makes a long journey in a dishevelled and dusty state, who stretches out his hands to heaven saying, “My Lord, my Lord,” when his food, drink and clothing are of an unlawful nature, and he is nourished by what is unlawful and asked how such a one could be given an answer.” 
The Ways Allah SWT Accepts Our Supplication
Most of us didn’t know the ways Allah SWT accepts the supplications of His slaves and that they thought Allah SWT didn’t accept their supplications. There is a hadith that specifically discusses matters related to this as mentioned in a narration of Abu Sa’id al-Khudri RA, Rasullullah PBUH said:
مَا مِنْ مُسْلِمٍ يَدْعُو بِدَعْوَةٍ لَيْسَ فِيهَا إِثْمٌ، وَلَا قَطِيعَةُ رَحِمٍ، إِلَّا أَعْطَاهُ اللَّهُ بِهَا إِحْدَى ثَلَاثٍ: إِمَّا أَنْ تُعَجَّلَ لَهُ دَعْوَتُهُ، وَإِمَّا أَنْ يَدَّخِرَهَا لَهُ فِي الْآخِرَةِ، وَإِمَّا أَنْ يَصْرِفَ عَنْهُ مِنَ السُّوءِ مِثْلَهَا
“Any Muslim who makes a supplication containing nothing which is sinful or which involves breaking ties of relationship will be given for it by God one of three things: He will give him a speedy answer, or store it up for him in the next world, or turn away from him an equivalent amount of evil.” 
Thus, it is understood from this hadith that there are four ways Allah SWT accepts the supplications of His slaves, which are:
- Allah SWT will grant what His slaves asked for in this world. However, there are two ways the supplication may be granted, whether it is immediately granted or postponed to a certain time before it is granted.
- Allah SWT will keep the supplication to the hereafter, for Allah is the All-Knowing that the salve will need it more there.
- Allah SWT will protect the salve from evil and catastrophes that happens to him.
- Allah SWT will not grant the supplication, for it is better for him this way. Hence, not granting the supplication is ensuring the slave a better way.
May Allah SWT grant us all a clear understanding in religion. Amin.
 Surah al-Ghafir: 60
 See al-Tahrir wa al-Tanwir, 183/24
 Narrated by al-Tirmizi (3247); he stated this hadith is hasan sahih.
 Surah al-Anbiya’: 90
 Narrated by al-Tirmizi (3479)
 Surah al-Fatihah: 1-7
 Narrated by Al-Bukhari (1145); Muslim (758)
 Narrated by Ibn Majah (1752)
 Narrated by al-Bukhari (6400); Muslim (852)
 Narrated by al-Bukhari (6343)
 See Sahih al-Bukhari, 8/75.
 Narrated by Muslim (1015)
 Narrated by Ahmad (11133)