A Perth police officer is recovering in hospital tonight after allegedly being attacked by a group of teenagers outside Optus Stadium.