Most prayers have a good part and a misguided (foolish) part. At it's core the good part is wanting and asking God to give me what I need to be the best person He wants me to be - and can be - for Him.
The foolish part is thinking I know what accomplishes this better than God and therefore asking of Him things that are not truly best for me, Him or others.
What's the difference between what I want and what God wants?
We pray for what we think we need to be most fulfilled and the best person God wants us to be. God offers and gives to (or withholds from) us what he ¹knows is best for us to be that person.
If you knew what God knows about Himself, us, and the world, you would always ask for the right and best things i.e. what God desires. Your prayers would always be in line with what God ¹knows is best and therefore they would always be granted in just the way you asked them. We are promised if we "ask anything in His name he hears us." But knowing when we are asking for His sake and not our own isn't always clear.
The formula for successful (answered) prayer is actually wrapped up in this one little verse:
(To get a better feel of the richness and full meaning of this verse, I encourage you to read the entire psalm.)
When I first came across this verse early in my Christian life, what jumped out at me was God will give me the desires of my heart. That sounded good to me - as if God was offering to be my celestial genie in a bottle. I was all in!
As I've matured (some 50 years later) in my relationship and understanding of God (and of myself), what now stands out is we are called to delight ourselves in the Lord. An entire ²book could be written on what this means.
The bottom line is when we delight in God our desires are ³aligned with his i.e. what God and I want are the same thing. When they are, he grants what we want i.e. because it is what He wants, which happens to be what is best and true i.e. what honors Him most and truly advances us best.
Not because God has to "get His way" but because His way is always based on the perfect understanding of what is best. The only thing at issue is do we (you) trust him.
___________________________
¹We either deliberately ignore or quickly forget that God alone is all-knowing, all-seeing, all-powerful, and everywhere present - and of course perfectly good, caring and all loving.
To assume we know more or better than God is the height of arrogance and foolishness. He is God, not us. We only assume God is not good, caring, and loving when things get hard for us personally and it appears he's allowed things to get so messed up with all the pain and suffering in the world. When in reality he is doing exactly what is best and wisest in light of our rebellion (distrust) - even though it might appear otherwise. For a further discussion of this click here.
If we refuse to believe God is who He claims, we will think we know better than God what we and the world need most and our prayers will not be aligned with what is wisest and best.
What settles our doubts about God best is seeing and understanding who Christ is and what He willingly submitted to, so he could ultimately remedy our pain and suffering as well as the rest of creation. All that is wrong about us and the world will be permanently fixed one day because of what Christ did over 2000 years ago.
God didn't (doesn't) ignore the suffering as some accuse Him of doing, He embraced it and let it kill him so that He could free whoever accepted his offer of all pain one day. His overcoming death is our proof we too will one day be free. He is the first of anyone who embraces Him.
If we accept what He did for us and the rest of creation, we will be a part of that remedy and no longer a part of the problem i.e. among those who ignore or reject His offer.
²If you poke around my blog long enough, I address in many posts what's involved in our desiring God.
³It is not what we ask for but why we ask for it that determines whether God grants it or not.
Do we want something so we can better only our personal circumstances or honor God, advance our agenda or God's purposes, build our kingdom or His?
We often pray "in Jesus name" not as an expression of our hearts desire but as if this expression is some magical mantra, formula or spiritual fairy dust to sprinkle over our prayers to get God's approval regardless of why we ask or what we ask for. To pray in Jesus name simply means to pray for his honor and fame versus our own.
The irony, surprise, and reality is when we do we are actually advancing ourselves as well. God's perfect will is actually our highest good and our greatest gain though it often may feel or seem the opposite.
Not my will but thine but done.
Ask, seek, knock. Persist in prayer and you will be given what you ask for.
Why? If we don't get the answer we seek but continue to persist, it eventually causes us to identify an ill motive so we might realign our hearts with Gods. Once we do He gives us what we ask for.