In this Temple Mount Torah Study, Yehudah Glick teaches Psalms chapter 4 which is similar to chapter 3.
In chapter 3, King David was attacked by his enemies and crying out to God. The theme that repeats itself in both chapters are the peaceful sleep at night because he knows that God is with him.
In chapter 4 however, King David is talking from a totally different perceptive. Here the keyword to understanding this chapter is how King David calls his God as “eloqei tzidki” – the God of justice. Yehudah Glick continues on to explain how King David switched from crying out to God in restlessness, to being able to sleep in peace.