An electrician who “caused irreparable damage” to a woman in a WA tourist town had fallen asleep in a park in the hours before the attack, a court has heard.