David pens in Psalm 37:4 - "Take delight in the Lord, and He will give you the desires of your heart." At first glance, the idea conveyed may portray God as a Genie. Some may think - become a Christian, live a good little life, pray and ask God for anything and He will give it to me. Nope! Here is a better approach at understanding this verse and concept.
"Take delight" (delight thyself) in the original Hebrew is anag (aw-nag) meaning to be soft or pliable. "Desires" in the original Hebrew is mishalah (mish-aw-law) meaning a request or petition. So, the verse could be rendered - Make yourself or allow yourself to be pliable in the Lord and He will grant you what you have been petitioning about.
The key is making yourself or allowing yourself to be pliable, softened or moldable by the Master. This includes trusting in Him, His ways and His timing for everything. I never said and He never said this would be easy, but The Holy Spirit through David did say one comes before the other. First, humble thyself - enjoy meditating on His Word, meeting with the saints, going on mission trips, loving others, producing The Fruits of the Spirit, etc..., then your request will be entertained.
Paul said in Romans 8:5 - "Those who live according to the flesh have their minds set on what the flesh desires; but those who live in accordance with the Spirit have their minds set on what the Spirit desires." In other words, those who live or who are satisfied with the sinful nature (flesh) will not only gravitate toward those things, they will "set" their path or keep their path toward those trappings. The same could be said for those seeking The Holy Spirit. This is paramount in understanding Psalm 37:4. If you want your desires to line-up with God's and all Christians should - we should "set" our minds on what the Spirit desires. How do you do that? By keeping in The Word and staying attentive to His leading.
We are not only in a relationship with a king, we are in a relationship with The King. He knows everything about each of us. He wants His heart in us; His mind in us; His desires in us, so that we have the right petitions, the right requests, the right Desires.