Answered by Sidi Tabraze Azam
Question: I would like to ask relating to the dua of prophet Yunus (as). I read in Maariful Quran something like this: [(And this is how We rescue the believers – 21:87.) That is, just as We released Yunus from his misery and distress, so do We deliver other believers when they turn towards Us repenting their sins sincerely. According to a hadith of the Holy Prophet (Allah bless him and give him peace), if a Muslim prays to Allah Ta’ala for the grant of a wish in the words used by Yunus (a) when he was in the stomach of the fish i.e. la ila ha illa anta subhanaka inni kuntu minadhdhalimeen (21:87) He would accept his prayer and grant his wish. (Ahmad, Tirmidhi, Mazhari)] I’ve been trying this dua in my life for many years but didn’t always get what I prayed to Allah and wished for. If I turned to Allah and acknowledged that I did wrong and made that dua of Prophet Yunus(as), shouldn’t Allah answer my prayers? I don’t know what to do.
Answer: Assalamu alaikum wa rahmatullahi wa barakatuh,
I hope you are in the best of health and spirits, insha’Allah.
Jazakum Allahu Khayr for your questions. May Allah give you every ease and facilitation.
Repentance and Trials
Allah Most High says, “And turn unto Allah together, O believers, in order that ye may succeed.” [Qur’an, 24:31]
The key to having one’s prayers accepted is repentance. Nawawi mentions that there are three conditions for a valid repentance:  One leaves the sin;  One regrets doing the sin and  One resolves never to return to the sin. A believer sees his sins as mountains which are about to fall upon him.
Humans are weak and needy by nature, and Allah is the one who is absolutely free of any need. Ask Him, for He loves to be asked, “And when My servants question thee concerning Me, then surely I am nigh. I answer the prayer of the suppliant when he crieth unto Me. So let them hear My call and let them trust in Me, in order that they may be led aright.” [Qur’an: 2:186] See:A Reader on Tawba (Repentance)
Trials are blessings in disguise, and an opportunity to return back to Allah. The Messenger of Allah (Allah bless him and give him peace) said, ““How amazing is the believer’s affair! Allah decrees nothing for the servant except that it is good for him.” [Musnad Ahmad]
Continue saying the supplication of Yunus (Allah be pleased with him) and have conviction that Allah will answer one’s prayer. See: What Are Some Prophetic Supplications That Can Help Me Deal With Trials in My Life?
How Supplications are Answered
The Prophet (peace and blessings be upon him) said, “Call on Allah while having full conviction that He will answer, and realize that Allah does not answer the du’a that proceeds from a heedless, inattentive heart.” [Tirmidhi]
It is important to note that Allah has promised that one’s supplication will be answered, though [a] in the way Allah wishes, and not how we wish and [b] when Allah wishes, and not when we wish.
Moreover, the Messenger of Allah (Allah bless him and give him peace) taught us that supplications are answered in one of three ways: by actually giving the thing being asked;
 Or by warding off a harm that would have otherwise afflicted the person;
 Or as gifts awaiting the person in the next life, which is the best form of du’a being answered. [Musnad Ahmad]
Appreciating Blessings and Rejoicing in Allah
Realize that this is a test from Allah and that “Truly with hardship comes ease” [Qur’an, 94:6]. Further, remember that “Allah does not burden souls with more than they can manage” [Qur’an, 2:286]. Appreciate the blessings of Allah upon you and your family, be grateful for them, and Allah will increase you, ‘If you are thankful, I will surely increase you’ [Qur’an, 14:7] And finally realize that when Allah puts a supplication on one’s tongue, it is an sign that He wants to give you that thing. So have high hope, be ceratin of a response, and trust in Allah.
I’d also advise reading the following answer which outlines some key principles on supplicating: Struggling to Have Children: Ten Key Etiquettes of Du’a
And Allah alone gives success.
Checked & Approved by Faraz Rabbani