בְּהִתְעַטֵּ֤ף עָלַי֙ נַפְשִׁ֔י אֶת־יְהוָ֖ה זָכָ֑רְתִּי וַתָּב֤וֹא אֵלֶ֙יךָ֙ תְּפִלָּתִ֔י אֶל־הֵיכַ֖ל קָדְשֶֽׁךָ׃
내 영혼이 내 속에서 피곤할 때에 내가 여호와를 생각하였삽더니 내 기도가 주께 이르렀사오며 주의 성전에 미쳤나이다
Ibn Ezra
A psalm of David when he fled (mizmor le-David be-vorcho): The Gaon, Rav Saadia, desired to link all the psalms one to another. And he said, after [discussing the verse] "Why do nations assemble?" (Psalm 2:1), that what befell Absalom would [also] befall them [i.e., the rebellious nations of Psalm 2]. However, the commentator does not have the ability [or it is not possible] to link [them all] thus. This psalm [Psalm 3] is written in the First Book [of the five books of Psalms]. Therefore, one should not wonder if we find, in the Fifth Book, the prayer [composed] when he was in the cave (Psalm 142), an event which preceded the incident involving Absalom. And [this] psalm is in the manner of prophecy, in that [David] prophesied he would be victorious, [anticipating the outcome expressed later in verse 5] "and He answered me from His holy mountain." This is like the prayer of Jonah [who confidently declared from the fish's belly, (Jonah 2:8)], "My prayer came in unto You."
Rabbeinu Bahya
“And their outcry due to the labor went up to the Lord.” They were not worthy of redemption even though the end [of the exile] had already come. But because their labor caused them to cry out to God, He accepted their prayers. The verse mentions twice “due to the labor”: “And the Israelites groaned and cried out due to the labor, and their outcry due to the labor went up to God.” This shows that the prayer a person recites when in trouble and under duress is more wholesome and acceptable and goes straight up to God! Similarly, you will find that the Prophet Jonah inferred this when he said (Jonah 2:8): “When my soul grew faint upon me, I remembered the Lord and my prayer came to You, to Your Holy Temple.” The prophet said clearly that a prayer which is recited when one is suffering and faint, is a prayer that will come before God in His Holy Temple.