A Dudley Park man who pleaded guilty to performing indecent acts in public faced Mandurah Magistrates Court on Tuesday.
Matthew John Grapes was charged following a March 25 incident outside his home.
The court heard Grapes was spotted by passersby, naked from the waist down, exposing his penis.
Counsel for Grapes said his client, who has ADHD, had overdosed on prescribed dexamphetamines that day and could not remember the incident well.
Grapes had been looking at “erotic material” on his phone before appearing naked in public in a state of “intense arousal”.
His lawyer said he had not meant to offend anyone and accepted his behaviour was completely inappropriate.
Magistrate Vivien Edwards deferred sentencing until May 31 and ordered a pre-sentence and a psychological report.