After Stamkos scored on a breakaway off a pass from deep in the defensive zone by Hedman at 13:15 of the second period, the Lightning captain completed the hat trick from the top of the right circle on Tampa Bay's sixth power-play goal this season. That made it 4-1 with 1:46 left in the middle period.
"I've learned over the years that you stick with it, usually the flood gates open," Stamkos said.
The star forward took 12 shots on net.
"Obviously, he scored some goals out there tonight," Montreal defenseman P.K. Subban said. "We know he can do that, but in the playoffs last year we were a lot better than we were tonight. I'd tell Steven to enjoy it because the next time it's not going to happen."
It was the first game between the teams since Montreal completed a first-round playoff sweep last April.
"Here's what I'm going to say about that," Tampa Bay coach Jon Cooper said. "It's Game 3 for us, Game 4 for them. If they said at the start of the road trip we were going to go out and get six of eight points, they would have been clicking their heels.
"For us, this was a must-win because their team has been on a roll since the start of the season. They were probably a little bit tired. But that team is going to be heard from this year. That's a really good team."
Stamkos tied Martin St. Louis for the team record with eight career hat tricks.
Brendan Gallagher scored for the Canadiens, who went 3-1 on a season-opening road trip.
"It was a bad game for all of us," coach Michel Therrien said. "There was nothing good happening. As a coach you can feel at times the spirit, and tonight there was no spirit. We had a tough night."
Montreal failed to score on four power plays, and is 0 for 14 with the man advantage this season.
Hedman scored in his third consecutive game to put the Lightning up 1-0 with a backhander from the slot that eluded Carey Price 5:24 into the game. It is the defenseman's longest career goal streak.
Stamkos made it 2-0 on the power play at 9:51 of the first.
Gallagher cut Montreal's deficit to 2-1 on a nifty redirection with 7:44 left in the first.
After Ben Bishop made the initial save, Lightning defenseman Anton Stralman slid through the crease to stop Jiri Sekac's rebound try early in the second.
Price was pulled after allowing four goals on 23 shots through two periods.
Callahan and Palat scored 17 seconds apart in the third against Dustin Tokarski. Namestnikov got his first NHL goal late in the period.
Tampa Bay outshot Montreal 18-1 in the third and 41-17 for the game.
NOTES: Cooper said rookie Jonathan Drouin (broken right thumb) is "really close" to making his NHL debut. ... Montreal D Alexei Emelin (upper-body injury) took part in the morning skate but sat out his second straight game. ... U.S. women's Olympic team player Anne Schleper skated in the Lightning's morning skate as part of Girls Play Hockey Weekend. "Impressive," Cooper said. ... Chicago Blackhawks senior adviser Scotty Bowman, who coached the Canadiens to five Stanley Cup championships during the 1970s, scouted the game. Montreal has won the Stanley Cup twice since Bowman's departure following the 1978-79 season.