He ends his prayer with confidence that God will answer his prayer. The statement, “When I awake", may refer to the next morning after this experience or to a vision of God after the resurrection.
Psalm 17:1-15 (NLT)1 O LORD, hear my plea for justice. Listen to my cry for help. Pay attention to my prayer, for it comes from honest lips.2 Declare me innocent, for you see those who do right.3 You have tested my thoughts and examined my heart in the night. You have scrutinized me and found nothing wrong. I am determined not to sin in what I say.4 I have followed your commands, which keep me from following cruel and evil people.5 My steps have stayed on your path; I have not wavered from following you.6 I am praying to you because I know you will answer, O God. Bend down and listen as I pray.7 Show me your unfailing love in wonderful ways. By your mighty power you rescue those who seek refuge from their enemies.8 Guard me as you would guard your own eyes. Hide me in the shadow of your wings.9 Protect me from wicked people who attack me, from murderous enemies who surround me.10 They are without pity. Listen to their boasting!11 They track me down and surround me, watching for the chance to throw me to the ground.12 They are like hungry lions, eager to tear me apart— like young lions hiding in ambush.13 Arise, O LORD! Stand against them, and bring them to their knees! Rescue me from the wicked with your sword!14 By the power of your hand, O LORD, destroy those who look to this world for their reward. But satisfy the hunger of your treasured ones. May their children have plenty, leaving an inheritance for their descendants.15 Because I am righteous, I will see you. When I awake, I will see you face to face and be satisfied.