A 40-year-old man has pleaded guilty in the Perth Magistrates Court to covertly filming more than 40 women while they were showering in backpacker hostels across Perth.

Allyn Wilson Fitzgerald used his iPhone to record 70 video clips of women in showers over a 12 month period.

The court heard Fitzgerald would hide in neighbouring cubicles before filming his victims.

He pleaded guilty on Tuesday to 41 charges of using a surveillance device to visually record a private act.

Fitzgerald was caught in November but he was released on bail while he sought legal advice.

Detectives arrested him overnight after he was caught at a hostel in Perth's western suburbs filming more women.

The court heard Fitzgerald was a former serviceman with the Australian Navy and was suffering from post-traumatic stress disorder.

He had been a submariner for 12 years.

Magistrate Joe Randazzo said the offences were a gross invasion of privacy involving many women over a long period of time.

The magistrate ordered a psychological assessment ahead of sentencing.

Fitzgerald has been remanded in custody until he is sentenced in March.