Sharapova, who took nearly three-and-a-half hours to beat Karin Knapp in 40C heat on Thursday, seemed set for a stroll in the considerably cooler (22C) Melbourne Park after dismantling Cornet in the first set.
But the pitch of her shrieks intensified as she struggled to find her rhythm and her serve in the second.
Cornet, the 25th seed, broke to lead 3-1 but the Russian broke straight back and had match point at 5-3 before Cornet broke for 5-5 and then 6-6 to set up a tie-break.
Sharapova had several aborted ball tosses and served six double faults in the second set, notably when Cornet levelled at 5-5, with only 52% of first serves going in.
The 26-year-old's groundstrokes kept her in the match, and 29 minutes after her first match point she manufactured a second to clinch the tiebreak.
The four-time Grand Slam champion won in one hour and 51 minutes to set up a clash with 20th seeded Slovak Dominika Cibulkova.
"She started playing better when I gave her some chances," said Sharapova. "After my last match I'm just glad to be through and have another day to recover.
"I definitely need to step it up - every player will need to raise their game."
Unheralded Spaniard Muguruza overcame her nerves to beat former world number one Wozniacki.
"I was really nervous, it was the third round of a Grand Slam and against a great player," said the 20-year-old, who won her first WTA title with victory at this month's Hobart International. "I was only thinking about being aggressive and not being scared."
Wozniacki said: "Sometimes it happens, you just don't take your chances. I don't think I did anything particularly wrong. I thought she played some great tennis. It was just a bit unlucky."
Azarenka (Bls)  beat Meusburger (Aut) 6-1 6-0
Two-time defending champion Azarenka brushed aside unseeded Meusburger to set up a fourth-round match against American Sloane Stephens.
Azarenka beat Stephens in last year's semi-finals under acrimonious circumstances when she took a medical time out while trailing Stephens. When Azarenka returned, she broke Stephens' serve and went on to win the match.
"Sloane is a great player, she's improved so much from last year," Azarenka said.
Nadal (Spa)  beat Monfils (Fra)  6-1 6-2 6-3
Nadal produced a clinical display to beat the dangerous Monfils in the final match of the day.
The Frenchman managed just three games in the first two sets and, although he fared better in the third, Nadal eased to victory.
"That makes the level that I played tonight better," said Nadal. "But that's it. Just one very good day. That makes me feel confident, but I am in the fourth round. That's all."
Next up for Nadal is Japan's Kei Nishikori, who won 17 of the last 18 games in beating Donald Young 7-5 6-1 6-0.
Kei Nishikori (Jpn)  beat Donald Young (USA) 7-5 6-1 6-0
Dom Inglot is the only remaining Briton in the men's doubles after Colin Fleming, Ross Hutchins and Jamie Murray all went out in round two.
Inglot and his partner Treat Huey of the Philippines beat Andreas Seppi and Potito Starace 6-4 6-7 (5-7) 6-1 on Court 15 to reach the last 16.
There they will face seventh seeds Rohan Bopanna and Aisam-Ul-Haq Qureshi, who ended the hopes of Fleming and Hutchins.
Asked about being the lone Briton left, Inglot told BBC Sport: "Obviously I'm disappointed, because I want those guys to do well.
"We're all a very good team and support each other, and it's sad to see those guys out. I'll do my best to keep the flag waving for Britain - and I'm sure Andy [Murray] is doing his part as well!"
Playing their first Grand Slam since Hutchins recovered from Hodgkin's lymphoma, the British pair led 2-0 in the final set on Court Two, but went down 4-6 6-3 6-2.
"It was an exciting match, great atmosphere, we loved playing out there and it's one match we feel like we could have got the better of it," said Hutchins.
Interview - Jamie Murray
"If we could have kept our level up a little bit longer I think that would probably have given us the win, but it wasn't to be. But look forward to playing more big matches in the Grand Slams and we're really optimistic."
Over on a blustery Court Seven, Murray and Australian partner John Peers could make little impression on the solid pairing of American Eric Butorac and South Africa's Raven Klaasen, who won in 61 minutes without facing a break point.
"It's disappointing to lose but I think the other guys played better than we did," admitted Murray, who also lost in the mixed doubles with Zimbabwean partner Cara Black.
Day six also saw the junior competition get under way, but Britain's Freya Christie and Emily Arbuthnott were both beaten.
Quotes of the day
"No, no, I'm not superstitious at all. Eight is my favourite number, but obsessed would be a bit extreme."
Roger Federer reacts to a local paper story that he is "obsessed" by the number eight, and always demands eight towels.
"I have great memories of last year. That's all I keep for me. Sloane is a great player, very tough competitor."
Victoria Azarenka has put behind her last year's semi-final win over Sloane Stepehens, which incuded a controversial medical timeout.
Stephens is clear on her off-court relationship with Azarenka.
"I don't know him particularly well. I mean, I get on well with him…"
Andy Murray shows his defensive skills when asked about a picture of him in the ice bath Grigor Dimitrov.
"I was opening a bank account in US dollars and I was filling out a form for the ATP. So when they called me, it's not like I put this in the rubbish, but, you know, I put this straight in my bag and then I went to see the referee."
'Lucky loser' Stephane Robert on what he was doing when told he had a place in the main draw.
"When I'm not in the tournament any more, like it sounds rude, but I don't really look at the games any more."
Caroline Wozniacki is asked whether her conqueror, Garbine Muguruza, can now beat Agnieszka Radwanska.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.