During that time, the defendant completed a costume change and returned to the footpath.
"He had changed into multi-coloured boxer shorts, which he pulled down to expose his genitals while facing in the direction of the victim's house," court documents said.
The court heard the defendant was seen "fiddling" with himself while looking in the woman's direction.
"The defendant then turned around and bent over displaying his buttocks, often described as 'mooning'," police said.
Over the next hour, the lewd acts continued, all while the man yelled "incoherently".
When police arrived, they found him in the driveway, touching himself.
The man later told Probation he had no memory of the fiasco and had been drinking heavily in the days beforehand.
He had also stopped taking medication, counsel Karlena Lawrence said, which had sparked a manic episode.
She told the court her client's partner had been admitted to Wakari Hospital at the time because of serious self-harm, which had had a severe effect on the defendant's state of mind at the time.
Judge Kevin Phillips accepted the man had mental health issues but that did not excuse the indecent behaviour.
"That [disorder] affects members of our community . . . but they don't run around the neighbourhood dressed in a red G-string, and they take their medication they're directed to take," he said.
He granted permanent name suppression to protect the defendant's partner.
The victim said the experience had made her feel physically sick, and she was worried for children who may have witnessed the bizarre antics.
The man was sentenced to 12 months' intensive supervision and three months' community detention.