A naked man has died after apparently being electrocuted while riding on the roof of a train at Balaclava station in Melbourne's inner south-east.

Power had to be cut before emergency services could reach the man due to safety reasons.

Police believed the man in his 20s was a passenger on an outbound train and was riding on the roof as it pulled into the station.

"It appears a passenger on the train has climbed onto the roof as it approached the platform and was injured," a Victoria Police spokesperson said.

Ambulance Victoria were called to the scene at 2:30pm (AEST) on Friday.

Police are yet to formally identify the man and determine the exact cause of his death, but said the "possibility of misadventure" may form part of the investigation.

A witness who was working nearby told the ABC the man was naked and walking on the roof when he fell on top of the train's electrical system.

He said the man was "convulsing and shaking" and was on fire for about five minutes.

Paramedics assessed two train drivers at the scene but said they did not need further attention.