There is a story in 2 Samuel of one of David’s sons named Amnon. It says that Amnon was in love with his half sister Tamar and eventually raped her (2 Samuel 13:14). When David found out about this he was angry, but surprisingly did nothing to judge Amnon (2 Samuel 13:21) Tamar goes to her brother Absalom and stays with him. Absalom is angry after after a long period of time takes it upon himself to have Amnon murdered to avenge Tamar (2 Samuel 13:29).
Absalom then runs from David and it says that he ran to Talmai the Son of Ammihud, the king of Geshur for a period of time until his return to Israel three years later (2 Samuel 13:37-38). In all of this, David treats his children with some distance and without much love or understanding. Which seems strange for someone who was called a man after God's own heart. Something that we might find surprising that the Bible mentions, but the Bible never sugarcoats his disciples' faults.
After a period of time, Absalom decides that he would rather be king than his father David. He sets up a conspiracy which grows right under the nose of David. These events were prophesied about by Nathan in 2 Samuel 12:11-12 when he told David that trouble would come from his own household because of his sin against Uriah and Bathsheba. David was told that trouble would arise from his own household.
It is against this backdrop that Psalm 3 is written for it says that David wrote Psalm 3 while running from Absalom. David actually left Jerusalem for a period of time and was on the run from his son. Psalm 3 says,
3 Lord, how are they increased that trouble me! many are they that rise up against me.2 Many there be which say of my soul, There is no help for him in God. Selah.
3 But thou, O Lord, art a shield for me; my glory, and the lifter up of mine head.4 I cried unto the Lord with my voice, and he heard me out of his holy hill. Selah.5 I laid me down and slept; I awaked; for the Lord sustained me.6 I will not be afraid of ten thousands of people, that have set themselves against me round about.
7 Arise, O Lord; save me, O my God: for thou hast smitten all mine enemies upon the cheek bone; thou hast broken the teeth of the ungodly.8 Salvation belongeth unto the Lord: thy blessing is upon thy people. Selah.
You may notice here that the people were saying that “there is no help for him in God”. It wasn’t that they were saying that God could not save him. Rather, they were saying that God would not save him because he was getting what he deserved. David may very well have felt that way. After all, the sins he committed against Uriah and with Bathsheba were very selfish and ugly sins. But, David never forgets that God doesn’t treat any of us the way that we deserve, but rather with grace. Nor does he abandon or ignore the person who puts his or her trust in God.
If we are going to be honest, a lot of believers stumble here as well. They don’t doubt that God can do something, but struggle with whether or not God is willing to do something for them. And there is a bit of mystery to God and why he answers some prayers the way he does. There is bound to be some mystery when God is infinite and we finite. We simply cannot grasp with our minds the person of God in all his fullness much less understand everything about him. In Isaiah 55:8-9 it says that God’s way and thoughts are not like ours. God’s ways are higher than the heavens compared to our thoughts.
So, David goes boldly to God and cries out to God. (verse 4) Scripture repeatedly encourages the believer to pour out their hearts with abandon to the Lord. This is one of the characteristics of the Psalms. The Psalmist never holds back their feelings and emotions from God when he feels abandoned. We should be the same way. God honors those who trust him even when life gets hard and they don’t understand what God is up to.
The result of his pouring out his heart to God is that though David is being chased away from Israel he can lay down and sleep in peace. He isn’t afraid though there is a great army against him verse 6. David’s confidence is not in himself and not even in his own goodness, but rather in God’s faithfulness and mercy. I think our faith and trust should be in the same thing.