Mathieu Joseph, Taylor Raddysh, Boris Katchouk and Pat Maroon also scored for the Lightning, who won their third in a row and ninth of their last 12. Victor Hedman had three assists to boost his team-leading total to 21. Backup goalie Brian Elliott made 38 saves.
Elliott was especially sharp early as Tampa Bay was slow to get going on the second game of a back-to-back after a 3-2 overtime win at Boston on Saturday.
"They pushed and (Elliott) was there for us," Lightning coach Jon Cooper said. "You need your goalie to make those saves until we get our legs."
Elliott was glad to perform well in Philadelphia, where he had spent the previous four seasons.
"Anytime you come to a building you played a while at, you want to have success," he said. "It's something you definitely circle on the calendar, and if you get a chance to play, you want to do your best."
Cam Atkinson scored for the Flyers, who have lost eight in a row and are two losses away from tying the club record of 10 consecutive defeats.
"Didn't go well for us," Flyers coach Alain Vigneault said.
Carter Hart made 10 saves before being replaced by Martin Jones, who also had 10 saves.
The Flyers' skid started when Tampa Bay visited Philadelphia on Nov. 18 and beat them in a 4-3 shootout. Then, the Lightning beat the Flyers at home 4-0 on Nov. 23.
"We are looking for solutions to our situation," Vigneault said. "The leader of this group, the guy that's got both his hands on the steering, is me. I got to find a way to get this group to play better. We're in a bad skid right now and we need to end this."
Sunday's game wrapped up the season series against Tampa Bay. But it wasn't pretty.
McDonagh and Perry scored in the first for Tampa Bay. Raddysh made it 3-0 with a hard slap shot from the right side that beat Hart on the glove side just 2:56 into the second period, and four minutes later, Katchouk knocked in a rebound that was just sitting in the crease.
"If we're going to go anywhere, we're going to need that depth scoring," Cooper said.
Philadelphia was in a four-goal hole, and it got worse at 8:34 in the second, when Joseph scored a short-handed goal after Hart misplayed the puck near his own net. That was the end of the night for Hart, who was replaced by Jones.
"Things aren't going our way right now," Hart said. "It's tough, but we just got to stick with it."
Even when the Flyers got the puck across the goal line in the second, it didn't count. Officials ruled on video review that the puck went off a high stick of Scott Laughton before going in.
Philadelphia has struggled to score all season, and have been outscored 36-13 during the eight-game losing streak. The Flyers entered averaging 2.4 goals per contest, which was 27th in the NHL. They haven't netted more than three goals since Oct. 27, a span of 18 games.
The Flyers did, however, get a goal on the power play. Atkinson deflected home Claude Giroux's wrister with 12:56 to play .
Lightning: Brayden Point (upper body) missed his eighth game in a row. Point will be sidelined for at least another four weeks. ... LW Pierre-Edouard Bellemare took a hard shot to the skate in the final minute of the second period but returned for the third.
Flyers: Winger Joel Farabee injured his left shoulder sliding into the boards in the first period of Wednesday's 4-1 loss at the Rangers. He won't need surgery and is week-to-week, coach Alain Vigneault said Saturday. ... C Patrick Brown returned to the lineup after missing the previous seven with a thumb injury. ... C Derick Brassard (hip) was sidelined for the fifth straight contest. ... C Sean Couturier suffered an apparent facial injury in the first period, as he skated with a face shield beginning in the second.
Lightning: At Montreal on Tuesday night.
Flyers: Host Colorado on Monday night.
Lightning score seven in rout of Flyers
The Lightning win their third game in a row after a 7-1 thrashing of the Flyers.