The loss ended the Flyers' four-game winning streak, which equaled their longest of the season. It also continued their home futility against the Sharks. San Jose has not lost in Philadelphia since 2000.
Pavelski, who was on Team USA's top line with James van Riemsdyk and Phil Kessel in the Olympics, scored his 30th and 31st goals just 5 minutes, 49 seconds apart in the second period to put the Sharks ahead, 3-2.
"In the second period, we were really soft in front of our net and didn't help our goalies - and they got pretty much every goal from the crease," said defenseman Andrej Meszaros, who scored the Flyers' first goal.
Mason, who had a 1.00 goals-against average in his last three games before the Olympic break, allowed four goals on 13 shots before being replaced by Ray Emery in the second period. Mason returned to the game with 9:11 left.
Coach Craig Berube said Emery was pulled because he had an "issue" but would not elaborate.
"Something didn't feel right," said Emery, who would not be specific.
Berube said the Flyers "almost looked like we stopped competing after they tied the game up."
The rookie coach said his players were "not competing around our net. That's basically what it boils down to. We've got people there . . . not boxing people out, not being hard on people. It's like I said, we didn't compete hard enough to win the hockey game. Nobody."
With Michael Raffl in the penalty box for tripping, Pavelski showed great hands in front of the net and made a clever move to beat Mason and knot the score at 2. After a turnover by defenseman Nick Grossmann, Pavelski's tip-in of Marc-Edouard Vlasic's drive made it 3-2 with 9:48 left in the second period.
Just 35 seconds later, after Mason failed to glove a shot, Couture converted a juicy rebound to give the Sharks a 4-2 cushion and send Mason to the bench. Couture had missed the previous 16 games after undergoing hand surgery.
Pavelski completed his hat trick with 5:50 remaining in the second period, putting San Jose ahead, 5-2.
Torres made it 6-2 with 2.2 seconds left in the second. The feisty left winger tore his anterior cruciate ligament in the preseason and made his season debut Thursday.
It was a reversal of the teams' Feb. 3 meeting, won by the Flyers, 5-2, in San Jose. In that game, the Flyers outscored the Sharks, 4-0, in the final period.
Without veteran Kimmo Timonen in the lineup Thursday, the Flyers defense looked lost. Timonen needed an extra day of rest after helping Finland win a bronze medal in the Olympics, and he will return to the lineup Saturday against the New York Rangers.
"Kimmo's a calming influence back there," Mason said. "He's extremely patient with the puck and makes good decisions, but we can't make excuses."
The Flyers were also outscored by 5-0 in the second period of a 7-0 loss to Washington on Nov. 1. They rebounded and defeated New Jersey in their next game, 1-0.