The incident happened as Russian 11th seed Alexandrova was serving in the second set, with the girl falling onto her back while standing at the base of the umpire's chair.
Emerging Turkish star Sonmez sprinted over to help while Alexandrova fetched ice bags from a courtside fridge, before the youngster received medical attention.
Play was suspended for several minutes with temperatures reaching 28 °C in Melbourne.
"I always say it is more important to be a good human being than a good tennis player," Sonmez told BBC Sport.
"It was just my instinct to help her, and I think everyone would do the same. I'm happy I got to help."
Sonmez stuns Alexandrova
When they resumed, qualifier Sonmez stunned Alexandrova 7-5, 4-6, 6-4 for the biggest win of her career.
The 23-year-old made headlines at Wimbledon last year, becoming the first player from Turkey to reach the third round at a Grand Slam in the Open era.
She will play either American wildcard Elizabeth Mandlik or Hungary's Anna Bondar next.
Temperatures have been known to soar past 40 °C during the Australian Open.
They are forecast to reach a high of at least 36 °C this week.
