The third seed, wearing a sleek pale blue dress, was made to work hard for her passage into the second round and lost her service twice as her American opponent mixed things up with her all-court game.
Mattek-Sands, famous for her distinctive outfits, retained her trademark knee socks despite the heat and sported a riot of stripes and colour topped off with a purple pony-tail, a look Sharapova described as "very creative".
When it came to the tennis, though, it initially looked like the 2008 Australian Open champion would have things all her own way.
Sidelined from the US Open and the latter part of last season with an injury to her right shoulder, Sharapova released some pent-up frustration by roaring into a 4-0 lead to leave 41st-ranked Mattek-Sands reeling under the lights of Rod Laver Arena.
"I knew that it was going to be a tough match," said the Russian, who next plays 44th-ranked Italian Karin Knapp. "No matter what I had to do, I wanted to get through it, and I think that's what it was about today."
After clinching an early break in the second set, Sharapova wobbled to allow her opponent back into the game but the American double-faulted at 4-4 to concede the decisive break, allowing the Russian to serve out and seal the match with a booming serve.
Although pleased to have avoided the worst of the heat on a day when temperatures peaked at 42.2 degrees Celsius, for Sharapova it was enough just to be playing in one of her sport's big four tournaments again.
"I was happy just to play, despite the heat or anything. I've been out of the game for a while, so I was happy to be back in a grand slam atmosphere," she said.
- Sports & Recreation