"when I was in distress"

This morning these lines from Psalm 4 caught my eye...

You have given me room when I was in distress.

You have put more joy in my heart
than they have when their grain and wine abound.

In peace I will both lie down and sleep;
for you alone, O LORD, make me dwell in safety.