The men ran into the shelter when the volcano spewed a hot cloud of gas and ash that reached 7km down its southeastern slopes on Wednesday, sparking panic among residents.
Lieutenant-Colonel Mursal, who headed a rescue team that got through to the bunker, said rescuers found one body near the bathroom and the other near the bunker's door.
He said rescuers concluded that both men were killed by the heat of the cloud, estimated at around 400C.
The pair were helping people evacuate their village when the heat cloud and molten lava struck. They were the first human casualties since Merapi began showing increased activity in April.
The condition of the bodies was similar to having been "baked in an oven", a rescue worker who went inside the bunker using heat-protected clothing said.
Merapi has been emitting deadly heat clouds that can reach temperatures of up to 500C.
Highest alert again
Wednesday's large emission led scientists to place Merapi back on its highest alert, meaning they believe an eruption is imminent, a day after they had downgraded it.
On Friday the volcano emitted three heat clouds 5km down its southeastern slopes, near the site of the bunker where the men were killed, the volcanology office in nearby Yogyakarta city said.
Merapi emitted three heat clouds
5km down its slopes on Friday
Sunartono, a local relief official, said the bunker had been designed to protect people from passing heat clouds and that the two men had died because the bunker was buried under 2.5 metres of thick molten rock.
"Because the bunker was covered by extremely hot materials, the temperature inside was also very hot," he said.
About 15,000 villagers sheltering in makeshift camps in safe areas had just begun returning home on Wednesday when the heat clouds appeared. The volcano had been on red alert since May 13.
Merapi has shown fluctuating volcanic activity since mid-May but appeared to stabilise after a lava dome that had been forming at its peak partially collapsed last Friday.
The volcano's deadliest eruption was in 1930 when more than 1,300 people were killed.