Yes it is. Hebrews 5:7 and Matthew 26:39 jibes perfectly with the Messianic Psalms.
The cup was death and His prayer was answered.
And he went forward a little, and fell on his face, and prayed, saying, My Father, if it be possible, let this cup pass away from me: nevertheless, not as I will, but as thou wilt. Mt 26:39
who, when he was reviled, reviled not again; when he suffered threatened not; but committed himself to him that judgeth righteously: 1 Pet 2:23
Who in the days of his flesh, having offered up prayers and supplications with strong crying and tears unto him that was able to save him from death, and having been heard for his godly fear, Heb 5:7
The statement, 'nevertheless, not as I will, but as thou wilt', was Christ 'committing himself to him the judgeth righteously'.
His request, 'if it be possible, let this cup pass away from me', was a supplication to 'him that was able to save him from death'.
The fact that God raised Him from the dead shows both that His supplication was heard, and that God declared Christ to be righteous, after the Jews had unrighteously judged Him to be worthy of death
The following passages from the Psalms are Messianic and are directly related to what is recorded in Mt 26:39 & Heb 5:7:
He asked life of thee, thou gavest it him, Even length of days for ever and ever. Ps 21:4
For thou wilt not leave my soul to Sheol; Neither wilt thou suffer thy holy one to see corruption. Ps 16:10
8 I cried to thee, O Jehovah; And unto Jehovah I made supplication:
9 What profit is there in my blood, when I go down to the pit? Shall the dust praise thee? shall it declare thy truth?
10 Hear, O Jehovah, and have mercy upon me: Jehovah, be thou my helper. Ps 30
4 The cords of death compassed me, And the floods of ungodliness made me afraid.
5 The cords of Sheol were round about me; The snares of death came upon me.
6 In my distress I called upon Jehovah, And cried unto my God: He heard my voice out of his temple, And my cry before him came into his ears. Ps 18
4 Pluck me out of the net that they have laid privily for me; For thou art my stronghold.
5 Into thy hand I commend my spirit: Thou hast redeemed me, O Jehovah, thou God of truth.
13 For I have heard the defaming of many, Terror on every side: While they took counsel together against me, They devised to take away my life.
14 But I trusted in thee, O Jehovah: I said, Thou art my God.
15 My times are in thy hand: Deliver me from the hand of mine enemies, and from them that persecute me.
16 Make thy face to shine upon thy servant: Save me in thy lovingkindness.
17 Let me not be put to shame, O Jehovah; for I have called upon thee: Let the wicked be put to shame, let them be silent in Sheol.
22 As for me, I said in my haste, I am cut off from before thine eyes: Nevertheless thou heardest the voice of my supplications When I cried unto thee. Ps 31
( and there are too many other lengthy ones to include here)