Thank you. You children never cease to thrill me with your ideas and questions. I have never thought on this.
The Bible says that He was like us in every way. He got tired, weary, frustrated, angry, hungry and thirsty.
I sort of cringe at writing what the Son of God was thinking while He hung there, naked, humiliated, thirsty and - oh the pain! To the Romans, who controlled the country at the time of Jesus, crucifixion was the most painful way they could think of to kill people. It sort of put you off doing wrong to them. You die slowly and painfully of asphyxiation - because you cannot breathe much at all.
He thought of His Mum (Mary) and told John to take care of her (John 19:26-27). He thought very kindly of the criminal who knew that he deserved to die. Jesus gave him a solemn promise that: “Today you will be with me in paradise.” (Luke 23:39-43). Jesus did not answer the mocking insults of evil men. And lastly, God turned away from Him and left Him alone to suffer.
Jesus knew God had turned away and cried out: "My God, my God, why have you forsaken me." Then said "It is finished." And He then died for you. (Matthew 27:45-58)
Maybe He was thinking forward to this time when you read this and found out what He did and that He did it for YOU?
Finally, I guess his last thought could have been: “I have fulfilled Scripture and done all that my Father (God) required me to do to get humans into heaven.”