A dangerous sex offender with a history of committing crimes out of boredom and loneliness has been granted freedom from a West Australian prison and will be able to visit prostitutes in a bid to reduce his risk of reoffending.

The Supreme Court of Western Australia. Credit:Erin Jonasson

Edward William Latimer, 61, has a criminal record dating back to his teenage years and has spent most of his adult life in prison for offences including sexual assaults and wilful exposure.

For the second time in 11 years, the indefinitely imprisoned Latimer was granted release from jail, this time under a 10-year supervision order with 52 conditions including a curfew, no alcohol or porn, and no access to sex workers without approval.

WA Supreme Court Justice Anthony Derrick said in his decision handed down on Tuesday that while Latimer remained a serious danger, the risk could be managed within the community.