The 6-3 6-4 scoreline did not really do justice to how hard Sharapova was made to work in the 99 minutes the pair spent on court.
Mattek-Sands, who as usual stood out from the crowd with her purple hair and knee-length black socks, was a tough draw for the third seed and she scrapped all the way to the finish.
Sharapova was playing her first grand slam match since Wimbledon, having missed the US Open with shoulder problems that brought an early end to her season.
The Russian was straight back into the groove, moving into a 4-0 lead despite Mattek-Sands having her chances.
The American stopped the rot with two straight games, but Sharapova held on to her advantage to take the set.
Mattek-Sands fought back in the second set as well to lead 4-3, having trailed 3-1, but Sharapova always looked to have enough to win the games that mattered, and so it proved.
The world number three goes through to face Italy's Karin Knapp, who defeated Paula Ormaechea of Argentina.