Patrick Gavin Porter, of Grange, Inch Island, admitted performing an act outraging public decency.
The offence was committed on a bus travelling from Dublin to Derry on June 22, last year.
A second charge of exposure was 'left on the books and not to be proceeded with.
Derry Crown Court heard the evidence in the case involves CCTV footage from the bus lasting 40 minutes, however the first five minutes 'encapsulates the behaviour'.
This was played to the court.
It was revealed the 38-year-old has two previous convictions for exposure and is in breach of a suspended sentence.
Sentencing was adjourned for a probation pre-sentence report to be compiled.
Defence counsel Steven Mooney said they would also provide the court with a psychologist's report as Porter is already undergoing psychological counselling.
Porter was released on continuing bail to appear in court again on April 15.