Hariprasad became unconscious when the train was passing between Dindigul and Madurai.
Railway Doctor at Madurai, Janarthanan, who attended to the passenger, said he had suffered cardiac arrest and declared him dead.
Officials asked the family members to alight at Madurai, and arrangements were made for cremating the body at the Thathaneri Crematorium here.
The Health Inspector disinfected the coach and the train left for Rameswaram.
Earlier, as per norms, the body was sent to the government hospital at Madurai, for post-mortem.