Cheth
57 Let us hear what follows: “I have promised to keep Your law.” What means, “My portion, O Lord: I have promised to keep Your law”; save because the Lord will be each man's portion then, when he has kept His law? Consider therefore what he subjoins: “I entreated Your face, with my whole heart:” and saying in what manner he prayed: “O be merciful,” he says, “unto me, according to Your word”. And as if he had been heard and aided by Him whom he prayed unto, “I thought,” he says, “on my own ways, and turned away my feet unto Your testimonies”. That is, I turned them away from my own ways, which displeased me, that they might follow Your testimonies, and there might find a path. For most of the copies have not, “Because I thought,” as is read in some; but only, “I thought.” But what is here written, “and I turned away my feet:” some read, “Because I thought, Thou also hast turned away my feet:” that this may rather be ascribed to the grace of God, according to the Apostle's words, “For it is God who works in us.”...
58. Lastly, when he had received this blessing of grace, he says, “I was ready, and was not disturbed, that I may keep Your commandments”. Which some have rendered, “to keeping Your commandments,” some “that I should keep,” others “to keep,” the Greek being τοῦ φυλ·ξασθαι.
59. But in what manner he was ready to keep the divine commandments, he has added, in these words: “The bands of the ungodly have surrounded me: but I have not forgotten Your law”. “The bands of the ungodly” are the hindrances of our enemies, whether spiritual, as the devil and his angels, or carnal, the children of disobedience, in whom the devil works. For this word peccatorum is not from peccata, “sins;” but from peccatores, “sinners.” Therefore when they threaten evils, with which to alarm the righteous, that they may not suffer for the law of God, they, so to speak, entangle them with bands, with a strong and tough cord of their own. For “they draw iniquity like a long rope,” and thus endeavour to entangle the holy, and sometimes are allowed so to do.
60. “At midnight,” he says, “I rise to give thanks unto You: because of Your righteous judgments”. This very fact, that the bands of the ungodly surround the righteous, is one of the righteous judgments of God. On which account the Apostle Peter says, “The time has come when judgment must begin at the house of the Lord.” For he says this of the persecutions which the Church suffered, when the bands of the ungodly surrounded them. I suppose, therefore, that by “midnight” we should understand the heavier seasons of tribulation. In which he said, “I arose:” since He did not so afflict him, as to cast him down; but tried him, so that he arose, that is, that through this very tribulation he might advance unto a bolder confession.
61. For I imagine that what follows, “I am a companion of all them that fear You, and keep Your commandments”, does relate to the Head Himself, as it is in the Epistle which is inscribed to the Hebrews: “Both He that sanctifies and they who are sanctified are all of one: for which cause He is not ashamed to call them brethren.”...Therefore Jesus Himself speaks in this prophecy: some things in His Members and in the Unity of His Body, as if in one man diffused over the whole world, and growing up in succession throughout the roll of ages: and some things in Himself our Head. And on this account, that since He became the companion of His brethren, God of men, the Immortal of the mortal, for this reason the seed fell upon the earth, that by its death it might produce much fruit; he next adds concerning this very fruit, “The earth, O Lord, is full of Your mercy”. And whence this, save when the ungodly is justified? That we may make progress in the knowledge of this grace, he adds, “O teach me Your righteousnesses!”
Source: The Enarrations, or Expositions, on the Psalms (New Advent)