At 1.30am on Friday the man and a 17-year old friend crossed the railway tracks and decided to climb aboard a train.
Dagens Nyheter reports that a witness called emergency services after seeing a flash of light coming from the train.
The man was already dead when ambulance staff arrived on the scene.
His 17-year-old companion was taken to hospital where he was reported to be in a serious state of shock.