A Psalm of Asaph. Truly my heart is directed towards God. As the scripture says (Daniel 9:3), "And I set my face unto the Lord God, to seek by prayer and supplications." It is not merely prayer or supplications, but this is how the righteous plead with God to hear their prayer.
Our sages also taught (Berakhot 30b) that one should not pray frivolously, but with seriousness and not with idle words, so that his prayer will be heard. This is also expressed in the verse (2 Samuel 7:18), "Then King David went in and sat before the Lord." Is there really a sitting before God? Doesn't everyone pray while standing, as it says (Psalms 106:30), "And Phinehas stood up and prayed?"
Rather, what does it mean by "he sat"? It means that he sat in prayer until his prayer was complete. And afterwards, it says (2 Samuel 7:18), "Who am I, O Lord God?" Prepare your hearts and listen, as Rabbi Shmuel bar Nachman said, "If you direct your heart during your prayer, it will be clear that your prayer has been heard," as it says (Psalms 10:17), "You have prepared their heart, You have inclined Your ear."
Similarly, it says (Ezra 7:10), "For Ezra had prepared his heart to seek the Law of the Lord, and to do it." (Ibid. 7) "And the king granted him all his request, according to the hand of the Lord his God upon him." So too, we find in the case of Hezekiah, when he prayed for Israel, as it says (2 Chronicles 30:18), "For Hezekiah prayed for them, saying, The good Lord pardon every one." And when he prayed, he directed his heart, as it says (Ibid. 19), "With all his heart he sought the Lord God of Israel," and because he directed his heart, the Lord heard his prayer and healed the people.
Similarly, it says (Ibid. 30:27), "Then the priests the Levites arose and blessed the people: and their voice was heard, and their prayer came up to His holy dwelling place, even unto heaven." David said, "Since this is so, I will direct my heart before Him, so that He will hear me," as it says, "Truly my heart is directed towards God; I will sing and give praise."...