Remember what happened at the graveside of Lazarus in John 11:38-44. Ordinarily, the situation did not call for thanksgiving but Jesus, being a man of faith was not influenced by the happenings around. What was seen did not influence the direction of His prayer.
When Jesus came to the home of Lazarus, where people were in a mourning mood, where people were crying, Jesus did not allow the general mood to overwhelm Him. In other words, Jesus did not allow the happenings around to dictate the direction of His prayer.
Today, when things are good, our prayer would be that of thanksgiving whereas when things are tough, our prayer would be petitional rather than thanksgiving. Consider the case of Paul and Silas in the prison in Acts 16. Their condition did not call for thanksgiving and praises but as men of faith, the happenings around them did not overwhelm them to murmur and despair.