More than 17,000 Australians were shaken from their sleep by a 4.8 magnitude earthquake, the biggest to hit the state in years.