Drake Batherson also scored twice, and Thomas Chabot had a goal and an assist for the Senators (29-22-8), who are 6-1-1 in their past eight games. Linus Ullmark made 21 saves.
Morgan Rielly and William Nylander scored for the Maple Leafs (27-24-9), who have lost three in a row.
Joseph Woll allowed five goals on 28 shots before being replaced with 3:54 remaining in the second period by Anthony Stolarz, who made 11 saves in relief.
Rielly gave the Maple Leafs a 1-0 lead at 2:52 of the first period when he finished a pass from Auston Matthews with a wrist shot from the left face-off circle through Ullmark's pads.
Chabot tied it 1-1 at 10:59. Cozens carried the puck into the offensive zone, dished a pass to Brady Tkachuk at the right boards and drove to the net. Tkachuk found Chabot with a pass in the high slot where he beat Woll high to the glove side.
The Senators outshot the Maple Leafs 16-2 in the first period after Toronto recorded the first two shots of the game. In total, Ottawa had 19 straight shots until Matthews was stopped by Ullmark at 1:30 of the second period.
Cozens put Ottawa up 2-1 at 3:03 of the second period. Chabot's shot from the left point deflected off Toronto defenseman Troy Stetcher's left arm to Cozens, who scored into an open net from in front.
Batherson pushed the lead to 3-1 at 13:05 with a snap shot off the far post from low in the right circle after Maple Leafs defenseman Jake McCabe turned the puck over.
Nylander cut it to 3-2 just 51 seconds later at 13:56 when he got to the rebound off a Scott Laughton shot and squeezed the puck between the post and Ullmark’s outstretched left pad.
Batherson scored his second of the period to make it 4-2 at 15:15. Claude Giroux checked Matthew Knies in the neutral zone, which led to a turnover that Batherson collected and shot low to the blocker side from the high slot. Toronto challenged the play for offside, but the goal was upheld after a video review.
On the ensuing power play, Cozens extended it to 5-2 with his second goal at 16:06. Tim Stutzle sent a pass from below the goal line to Cozens in the right circle, where he sent a wrist shot in off Woll's glove to chase him from the game.