The incident happened aboard the 7:35 a.m. train from Grand Central Terminal to New Haven.
According to detectives, the victim claimed the man was masturbating in front of her while she was sleeping, then ran off the train when it stopped at the Fairfield station at 9:15 a.m. The train was held while Fairfield and MTA police responded and searched the train and the area around the station.
Manny Ramos, 34, of Brooklyn, was identified by the victim and apprehended on a nearby street.
He is charged with public indecency.
Sources say Ramos was hired as a coach cleaner in October 2011 and had been in an engineer training program since March of last year.
He was immediately suspended without pay, and disciplinary charges will be filed.
The investigation is ongoing.