Sheikh allegedly molested the woman around midnight on Thursday when she was asleep.
After the woman shouted for help, fellow passengers thrashed Sheikh, who was allegedly drunk, and handed him over to the Railway Protection Force (RPF) escorts on the train.
When the train reached Mughalsarai station around 1am, the RPF personnel handed over Sheikh to Government Railway Police (GRP) officials. The woman, who hails from Gaya and studies in Delhi, lodged a complaint against Sheikh at the GRP station.
The woman told the police that a few other pantry car staffers were drunk as well and loitering around the washroom.
On October 1, a senior IAS officer of Uttar Pradesh cadre, Shashi Bhushan Lal Susheel, was arrested for allegedly attempting to rape a woman co-passenger on the Lucknow Mail.
Two days later, a group of youngsters allegedly tried to molest girls on a train at Unnao between Kanpur and Lucknow.