The trains were passing each other near the town of Harda when a flash flood triggered by heavy rain struck the bridge, reports said.
The tracks collapsed and some of the carriages were submerged.
Officials say at least 25 people have been injured and another 300 rescued.
The Kamayani Express travelling to Varanasi from Mumbai derailed first, while the Janata Express travelling in the opposite direction derailed shortly after. It was not clear how many people were on both trains.
Speaking to a local TV station, one passenger described the scene just after the accident. "Water filled the coach till here," he said, pointing to his waist.
Another passenger said there had been "a sudden jerk" and "the carriage broke apart and people were crushed".
Survivor Manoj Mongi told the Hindustan Times: "I was sleeping and suddenly I felt a jolt. I woke up and saw that all the passengers were screaming and running. I came out. I saw three women floating, but I could not save them."
The bridge crosses the Machak river, about 950km (590 miles) from India's capital, Delhi.
"This unfortunate accident took place because of the flash floods on the tracks and the track caved in and resulted in the derailment of the last six coaches of the Kamayani Express," railways spokesperson Anil Saksena told the BBC.
"This train derailed, then simultaneously on the neighbouring line from the opposite direction, another train was coming. That train also encountered a flash flood situation. So it almost happened simultaneously on neighbouring tracks."
Although officials put the death toll at 24 - and in some reports higher - Mr Saksena said only 12 victims had been recovered from the trains, and other bodies found nearby could have been villagers caught in the flash floods.
Rescuers worked through the night, mostly in darkness, trying to free those trapped. Divers used gas-powered cutters to access the submerged carriages, officials added.
India has been badly hit by heavy monsoon rains and the tail-end of Cyclone Komen in recent days. More than 100 people have died in flooding, landslides and building collapses.
By Wednesday morning, all the coaches had been cleared and bodies of the victims recovered, Madhya Pradesh railway police chief MS Gupta told AFP news agency.
It was not clear if any passengers remained unaccounted for.
Railways Minister Suresh Prabhu tweeted that he had ordered an inquiry.
Prime Minister Narendra Modi said the accident was "deeply distressing" and offered condolences to the relatives of those who died.
Although severe weather played a part in the accident, former Railway Minister Dinesh Trivedi said it could have been avoided if the tracks had been better maintained.
"It's totally unacceptable. It's a symptom of a deep-rooted cancer in the railway system," he told reporters.
Safety standards on India's massive state-run railway network has been a concern amid a string of accidents.
In March a passenger train derailed in the northern state of Uttar Pradesh, killing at least 34 people.
And in February last year, at least 11 people died after three coaches of the Bangalore-Ernakulam Intercity Express derailed in the southern state of Karnataka.
Correspondents say the state-run railway network has a patchy safety record. Decades of neglect, low investment and subsidised fares have left the network in a shambles, they add.