The 20-year-old Stamkos leads the NHL with 19 goals and 35 points.
Nate Thompson scored the tiebreaking goal at 5:19 of the third period, flicking a rebound off Dana Tyell's shot past backup goalie Brian Boucher to complete the scoring.
Philadelphia, whose 10-game points streak ended Tuesday night in Montreal, lost its second straight and also snapped a seven-game home winning streak.
Adam Hall, Ryan Malone, Brett Clark and Steve Downie also scored for Tampa Bay, and Martin St. Louis had five assists. Nikolay Zherdev scored twice for Philadelphia, and Andreas Nodl, Jeff Carter, Scott Hartnell, Danny Briere and Andrej Meszaros also scored.
The Flyers scored the first two goals 42 seconds apart in the nine-goal first, beginning at 4:21. Nodl flipped a rebound off Zherdev's shot past Dan Ellis, then Zherdev scored his own goal by redirecting Matt Carle's cross-ice pass into an open net.
Tampa had similar rapid-fire success against Sergei Bobrovsky, who was making his 12th straight start. The Lightning beat the rookie twice in a 16-second span. Stamkos scored a power-play wrist shot that sailed past Bobrovsky's stick side, and Hall knocked in a rebound off Victor Hedman's shot.
Continuing the relentless theme of the night, the Flyers quickly retook the lead less than a minute later when Carter's shot slipped under Ellis' pads. Malone immediately answered with a power-play one-timer.
Ellis was pulled after allowing Hartnell's deflection to elude him. Backup goalie Mike Smith followed suit, surrendering an open-net goal to Briere with less than 2 minutes to go in the first period.
Bobrovsky didn't last much longer, surrendering a goal to Clark to make the score 5-4. The defenseman's shot actually went through the net. Bobrovsky was replaced in the second period by Brian Boucher.
Scoring didn't cease when the players returned, with Stamkos tying the score with his second goal. The Flyers regained a two-goal lead with Zherdev's second goal and Meszaros' score.
Downie's pulled the Lightning within a goal, and Stamkos' power-play one-timer with 1:01 left in the second period tied it.
NOTES: Twenty-nine players had at least one point. ... The NHL record for goals in a period is 12, set in the second period by the Buffalo Sabres and Toronto Maple Leafs on March 19, 1981. The Sabres had nine of the 12 goals. ... Stamkos has three career hat tricks.