Passengers said the fire spread swiftly through the coach.
"We woke up suddenly when the train came to a halt. That's when we noticed the fire at one end of the coach and shouted out. People were still sleeping, but once they realized the danger they scrambled to the door," Shantanu, a passenger in the coach, told New Delhi Television.
He said it took passengers a few minutes to react and push their way through the narrow space between the berths.
"By the time we got out of the door, the coach was completely on fire," said Shantanu, who like many Indians uses only one name. He said firefighters sprayed water over the burning coach, but it was gutted.
Sridhar said the fire may have been caused by an electrical short circuit in the coach.
The blaze killed 32 people and nine others were missing, said K. Sambashivarao, a spokesman for the Indian railways. Earlier, a regional railway manager, Anil Kumar, had put the death toll at 47. He was not reachable Monday afternoon. At least 25 others were hospitalized with burns, officials said.