I found this excellent article, which explains about the etiquette of asking Allah to answer a prayer, or make Dua, as it called in Islam.
Here is the link where I found it from: The Etiquette of Making Dua
(From the website)
Praise be to Allaah.
Imaam Ibn al-Qayyim (may Allaah have mercy on him) said:
“duas and ta’awwudhaat [prayers seeking refuge with Allaah] are like a weapon, and a weapon is only as good as the person who is using it; it is not merely the matter of how sharp it is. If the weapon is perfect and free of faults, and the arm of the person using it is strong, and there is nothing stopping him, then he can lay waste the enemy. But if any of these three features is lacking, then the effect will be lacking accordingly.”
(al-Daa’ wa’l-Dawaa’, p. 35).
From this it will be clear that there is an etiquette and rulings which must be fulfilled, in the dua and in the person making the dua. There are also things that may prevent the dua reaching Allaah or being answered – these things must be removed from the person making the dua and from the dua. When all of these conditions are fulfilled, then the dua may be answered.
1. Sincerity in making dua. This is the most important condition. Allaah has commanded us to be sincere when making dua, as He says (interpretation of the meaning):
“So, call you (O Muhammad and the believers) upon (or invoke) Allaah making (your) worship pure for Him (Alone) (by worshipping none but Him and by doing religious deeds sincerely for Allaah’s sake only and not to show off and not to set up rivals with Him in worship)” [Ghaafir 40:14].
Sincerity in dua means having the firm belief that the One upon Whom you are calling – Allaah, may He be glorified and exalted – is alone Able to meet your need, and it also means avoiding any kind of showing off in your dua.
2. Repentance and turning back to Allaah. Sin is one of the main reasons why duas are not answered, so the person who is making dua should hasten to repent and seek forgiveness before he makes dua. Allaah tells us that Nooh (peace be upon him) said:
“I said (to them): ‘Ask forgiveness from your Lord, verily, He is Oft-Forgiving; He will send rain to you in abundance, And give you increase in wealth and children, and bestow on you gardens and bestow on you rivers.’ ” [Nooh 71:10-12]
3. Beseeching, humbling oneself, hoping for Allaah’s reward and fearing His punishment. This is the spirit, essence and purpose of dua. Allaah says (interpretation of the meaning): “Invoke your Lord with humility and in secret. He likes not the aggressors” [al-A’raaf 7:55].
4. Urgently beseeching and repeating the dua, without getting exasperated or bored; this is achieved by repeating the dua two or three times. Restricting it to three times is preferable, in accordance with the Sunnah of the Prophet (peace and blessings of Allaah be upon him). Ibn Mas’ood (may Allaah be pleased with him) narrated that the Prophet (peace and blessings of Allaah be upon him) liked to say a dua three times and ask for forgiveness three times. This was narrated by Abu Dawood and al-Nasaa’i.
5. Making dua at times of ease, and saying more duas at times of plenty. The Prophet (peace and blessings of Allaah be upon him) said: “Remember Allaah during times of ease and He will remember you during times of hardship.” Narrated by Ahmad.
6. Seeking to draw closer to Allaah by calling upon Him by His Most Beautiful Names and Sublime Attributes at the beginning of the dua or at the end. Allaah says (interpretation of the meaning): “And (all) the Most Beautiful Names belong to Allaah, so call on Him by them” [al-A’raaf 7:180].
7. Choosing the clearest and most concise words and the best of duas. The best of duas are the duas of the Prophet (peace and blessings of Allaah be upon him), but it is permissible to say other words according to the specific needs of a person.
Other aspects of the etiquette of making dua, although they are not waajib (obligatory), are: to face the Qiblah; to make dua in a state of tahaarah (purity); to start the dua with praise of Allaah and blessings upon the Prophet (peace and blessings of Allaah be upon him). It is also prescribed to raise the hands when making dua.
One of the things that helps to bring a response to dua is to seek the best times and places.
Among the best times is the time just before Fajr (dawn), the last third of the night, the last hour of Jumu’ah (Friday), when rain is falling, and between the Adhaan and iqaamah.
Among the best places are mosques in general, and al-Masjid al-Haraam [in Makkah] in particular.
Among the situations in which dua is more likely to be answered are: when one is mistreated or oppressed, when one is travelling, when one is fasting, when one is in desperate need, and when a Muslim makes dua for his brother in his absence.
Things which may prevent dua from being answered include:
1. When the dua is weak in itself, because it involves something inappropriate, or involves bad manners towards Allaah, may He be exalted, or it is inappropriate, which means asking Allaah for something which it is not permitted to ask, e.g. when a man asks to live forever in this world, or he asks for a sin or something haraam, or he prays that he will die, and so on. Abu Hurayrah (may Allaah be pleased with him) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said: “A person’s duas will continue to be answered so long as he does not pray for something sinful or for the breaking of family ties.” Narrated by Muslim.
2. When the person who is making dua is weak in himself, because he is faint-hearted in his turning towards Allaah. This may be either because of bad manners towards Allaah, may He be exalted – such as raising his voice in dua or making dua in the manner of one who thinks he has no need of Allaah; or because he pays too much attention to the wording and tries to come up with unnecessarily ornate phrases, without paying attention to the meaning; or because he tries too hard to weep or shout without really feeling it, or he goes to extremes in that.
3. The reason why his dua is not answered may be because he has done something that Allaah has forbidden, such as having haraam wealth – whether it be food or drink or clothing or accommodation or transportation, or he has taken a haraam job, or the stain of sin is still in his heart, or he is following bid’ah (innovation) in religion, or his heart has been overtaken by negligence.
4. Consuming haraam wealth. This is one of the major reasons why duas are not answered. Abu Hurayrah (may Allaah be pleased with him) said: the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “O people, Allaah is Good and only accepts that which is good. Allaah commanded the pious to follow the same commandments as He gave to the Messengers. He says (interpretation of the meaning):
‘O (you) Messengers! Eat of the Tayyibaat [all kinds of Halaal (lawful) foods which Allaah has made lawful (meat of slaughtered eatable animals, milk products, fats, vegetables, fruits)] and do righteous deeds. Verily, I am Well-Acquainted with what you do’ [al-Mu’minoon 23:51]
‘O you who believe (in the Oneness of Allaah — Islamic Monotheism)! Eat of the lawful things that We have provided you with’ [al-Baqarah 2:172]
Then he mentioned a man who has travelled on a long journey and is dishevelled and covered with dust; he stretches forth his hands to the heaven, (saying) “O Lord, O Lord”, but his food is haraam, his drink is haraam, all his nourishment is haraam, so how can he dua be accepted?” Narrated by Muslim.
The man described by the Prophet (peace and blessings of Allaah be upon him) had some of the characteristics which help duas to be answered – he was travelling and he was in need of Allaah, may He be exalted and glorified – but the fact that he consumed haraam wealth prevented his dua from being answered. We ask Allaah to keep us safe and sound.
5. Trying to hasten the response. Abu Hurayrah (may Allaah be pleased with him) said: the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “The dua of any one of you will be answered so long as he is not impatient and says, ‘I made dua but it was not answered.’” Narrated by al-Bukhaari and Muslim.
6. Making the dua conditional, such as saying, “O Allaah, forgive me if You will” or “O Allaah, have mercy upon me if You will.” The person who makes dua has to be resolute in his supplication, striving hard and earnestly repeating his dua. The Prophet (peace and blessings of Allaah be upon him) said: “Let not any one of you say, ‘O Allaah, forgive me if You will, O Allaah, have mercy on me if You will.’ Let him be resolute in the matter, whilst knowing that no one can compel Allaah to do anything.” Narrated by al-Bukhaari and Muslim.
In order for duas to be answered, it is not essential to adhere to all of these points and be free of all that could prevent one’s duas from being answered. That is something which happens very rarely. But one has to try hard and strive towards achieving this.
Another important point is to realize that the response to the dua may take different forms: either Allaah will respond and fulfil the desire of the person who made the dua, or He will ward off some evil from him because of the dua, or He will make something good easy for him to attain because of it, or He will save it with Him for him on the Day of Resurrection when he will be most in need of it. And Allaah knows best.