The psalmist has taken an oath (119:106) to follow God’s righteous laws (mishpatim); for this oath and his stubborn commitment to walk in God’s ways — with his feet enlightened by Torah — he has suffered afflictions.
JPS: “I am very much afflicted” (119:107). The idea is to be bowed down, oppressed, imprisoned, put in bonds, weakened, devoid of strength, and humbled.
Why? For walking by the light he finds in Torah.
His prayer: “Preserve my life, YHWH, according to your word.”
It’s a circle.
Oddity isn’t it? He follows the light of the Torah, he is afflicted for following that light, and expects that same light of Torah to give him renewed light. He comes full circle. There is a little bit of a “You got me into this, now You get me out” approach to his life. Some people use such words foolishly; some people use such words wisely — they have followed God’s ways and God’s ways will be their redemption.
I’m sure many who have ended up imprisoned for protest have found these words of help. I’m sure those who have charted a new path for their life have used these words for help.
But, let’s not forget this: the light that guides our feet may lead us in the circle of good things, bad afflictions, good things.