The pod of around 70 long-finned pilot whales was spotted swimming perilously close to Cheynes Beach, 60km east of Albany, on Tuesday morning.
As the day progressed, the pod began moving closer to the beach sparking the concern of Department of Biodiversity, Conservation and Attractions officers.
Moments before the stranding, crews were surprised to see the pod form a loose heart shape in the ocean.
"Crews captured this remarkable behaviour from a drone camera, shortly before the whales moved towards the beach," the department said.
By 4pm a large stretch of the shoreline was covered in beached whales.
As night approached DBCA Parks and Wildlife Service staff arrived and set up camp for an overnight stay to monitor the welfare of the whales within a safety zone.
The team includes Perth Zoo veterinarians and marine fauna experts, along with specialised equipment, including vessels and slings.
"At this time, volunteers and the public are requested to not attend the beach overnight for their safety," the department said on its Facebook page.
Wildlife experts have speculated the unusual behaviour of the whales could be an indicator of stress or illness within the pod.
Pilot whales are highly social animals and often maintain complex familial relationships with their pods from birth.