In both Psalm 4 and Psalm 5, David declares that he is able to peacefully sleep knowing that he is under God’s care and protection. In Psalm 5, he wakes up, again aware of His need for his Lord.
David has confidence that God will answer his morning prayer because of his confidence in God’s heart of justice and righteousness. He knows God will always do what is right. David has so much opposition from his enemies that he cries out for God to make them pay for their rebellion against God! (Aren’t you glad the Bible deals with our real, sometimes raw emotions?)
David could fall into despair as he dwells on his opponents transgressions, but as he reminds himself of God’s constant care he finds himself once again crying out with these beautiful words, “But let all who take refuge in you rejoice; let them ever sing for joy, and spread your protection over them, that those who love your name may exult in you. For you bless the righteous, O Lord; you cover him with favor as with a shield.”