A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown  at sacred-texts.com
psa 77:1To Jeduthun--(See on Psa 39:1, title). In a time of great affliction, when ready to despair, the Psalmist derives relief from calling to mind God's former and wonderful works of delivering power and grace. (Psa. 77:1-20)
expresses the purport of the Psalm.
psa 77:2his importunacy.
my sore ran . . . night--literally, "my hand was spread," or, "stretched out" (compare Psa 44:20).
ceased not--literally, "grew not numb," or, "feeble" (Gen 45:26; Psa 38:8).
my soul . . . comforted--(compare Gen 37:35; Jer 31:15).
psa 77:3His sad state contrasted with former joys.
was troubled--literally, "violently agitated," or disquieted (Psa 39:6; Psa 41:5).
my spirit was overwhelmed--or, "fainted" (Psa 107:5; Jon 2:7).
psa 77:4holdest . . . waking--or, "fast," that I cannot sleep. Thus he is led to express his anxious feelings in several earnest questions indicative of impatient sorrow.
psa 77:10Omitting the supplied words, we may read, "This is my affliction--the years of," &c., "years" being taken as parallel to affliction (compare Psa 90:15), as of God's ordering.
psa 77:11He finds relief in contrasting God's former deliverances. Shall we receive good at His hands, and not evil? Both are orderings of unerring mercy and unfailing love.
psa 77:13Thy way . . . in the sanctuary--God's ways of grace and providence (Psa 22:3; Psa 67:2), ordered on holy principles, as developed in His worship; or implied in His perfections, if "holiness" be used for "sanctuary," as some prefer translating (compare Exo 15:11).
psa 77:14Illustrations of God's power in His special interventions for His people (Exo. 14:1-31), and, in the more common, but sublime, control of nature (Psa 22:11-14; Hab 3:14) which may have attended those miraculous events (Exo 14:24).
psa 77:15Jacob and Joseph--representing all.
psa 77:19waters . . . , footsteps--may refer to His actual leading the people through the sea, though also expressing the mysteries of providence.