The students, aged between 16 and mid-20s belonged to a group from Switzerland, who had been on a trip to Hamburg on the north coast, and were on their way home when several became ill.
Ambulance workers got aboard when the train stopped in Mannheim, south of Frankfurt. They took 14 of the Swiss group to local hospitals, while the rest were able to continue their journey in a different compartment.
"This is an illness that causes severe nausea and vomiting, and diarrhoea - and we could see that when we got on the train. They were all gathered around the toilets," Johannes Kattermann, head of the Mannheim Johanniter rapid reaction force told The Local.
He said 17 ambulances were used to take the students to hospitals in the area. The Johanniter medical team sent 15 people, fully kitted out in overalls and face protection to try to avoid infection.
"We were called out at 3.50am, and the team was back by about nine," he said.
"Even though they are volunteers, they are all trained and professional," he added. And despite the nature of the job, they were all pleased to have breakfast when they got back to base.
The two carriages in which the students had been travelling were removed from the train and taken off to be disinfected.