I prayed to the Lord, and I praised him.
If my thoughts had been sinful, he would have refused to hear me.
But God did listen and answered my prayer.
(Psalm 66:17-19 CEV)
Prayer and praise go hand in hand. The psalmist prayed to the Lord when he was in trouble, but at the very same time, he praised Him.
Our petitions of need should always be combined with the confession of the greatness of God. We are to additionally express our thankfulness and trust in Him ahead of seeing what His response and timing will be. By doing this our hearts are at peace before, during, and after receiving an answer to our prayers.
In praying, we should also express a sincere willingness to turn away from sin. We cannot effectively ask God for things when we are disobedient and not willing to turn away from the sin in our lives. When we come to God in prayer with our hands lifted up in praise and with repentant hearts, we can know confidently that He will hear us when we pray.
"There should be a parallel between our supplications and our thanksgivings. We ought not to leap in prayer, and limp in praise." - Charles Spurgeon