Claude Giroux, Sean Couturier, Wayne Simmonds and Adam Hall also scored for Philadelphia, which is 4-0-1 in its last five games after a 4-10-1 start.
Clarke MacArthur and Kyle Turris both had a power-play goal for the Senators, who have lost two in a row.
Timonen and Simmonds scored 23 seconds apart to snap a 2-all tie in the third period.
First, Timonen got his first goal of the season on a nifty move to give the Flyers a 3-2 lead. He skated in from the left side and stuffed a backhander past Robin Lehner.
Simmonds then scored on a turnaround slap shot from the slot, and Mason stoned Turris on a penalty shot with 5:06 left to preserve the two-goal cushion.
Coming off a 2-0-1 road trip that included a 5-0 win at Ottawa, the Flyers jumped out to a 2-0 lead before letting the Senators back in it.
Turris had a chance to give Ottawa the lead with a wide-open net midway through the third, but defenseman Nicklas Grossmann made a double-skate save in the crease. The play was reviewed after the next stoppage and upheld. The puck hit Grossmann's left skate, bounced off his right skate and out.
Timonen and Simmonds scored shortly after a long stop for the video review.
Down 2-0 for the 11th time in 21 games, the Senators started their comeback in the second period when MacArthur fired a top-shelf shot from inside the left circle through a screen and over Mason's shoulder.
It stayed 2-1 until the third period when Turris scored 10 seconds into Ottawa's fifth power-play chance. Turris backhanded a bouncing puck past Mason to tie it at 2.
The Flyers went ahead 1-0 after killing consecutive penalties that included a 12-second overlap. Giroux scored a power-play goal with 2:16 left in the first period off a perfect pass by Jakub Voracek, who faked a shot from the right circle and slid the puck across the ice. Giroux ripped it over defenseman Chris Phillips and past the sprawled Lehner.
It was only the second goal of the season for Giroux, and the Flyers captain celebrated by kissing his stick on the bench.
Couturier made it 2-0 early in the second by ending a 25-game goal drought. He took a shot from below the goal line that bounced off the post, hit Lehner's right skate and went in.
NOTES: Voracek has six points (two goals, four assists) in his last five games. ... Giroux didn't have any goals in the first 15 games before getting two in the last five. ... Lehner started over Craig Anderson, who lost to the Flyers last week and has allowed 11 goals in his last three games. ... The Senators have allowed the first goal in 14 consecutive games. ... Couturier hadn't scored a goal since April 15. ... Mason hasn't allowed more than three goals in his 21 starts since joining the Flyers in a trade last April.