Sheikh Mohammed Bin Rashid Al Maktoum and Sheikh Mohamed Bin Zayed Al Nahyan.
Sheikh Mohamed Bin Zayed also wished a speedy recovery to those injured.
His Highness Sheikh Mohammed Bin Rashid Al Maktoum, Vice President, Prime Minister and Ruler of Dubai, also sent a similar message to the Greek President.
The toll from Greece's worst rail accident has risen to 42, the fire department said Thursday, as hopes faded of finding anyone still alive in the wreckage from the head-on collision.
The two trains collided near a tunnel outside Larissa before midnight on Tuesday. Two carriages were crushed and a third caught fire, trapping people inside.
A fire department spokeswoman told AFP that rescue crews had worked all night in search for survivors, but chances were dwindling. "Time is not on our side," she said.
Passengers have described scenes of horror and chaos from the crash, many dodging smashed glass and debris as the train keeled over, and breaking windows to climb out.
WAM / AFP