John Tavares had a goal and an assist, Calle Jarnkrok and Auston Matthews also scored and Justin Holl had two assists for Toronto, which is 3-0-1 in its last four and 6-2-1 in its last nine. Ilya Samsonov had 31 saves.
Anders Lee scored twice for New York in its ninth loss in 10 games (1-6-3). Ilya Sorokin had 33 saves.
The Maple Leafs 1-0 after one period and coach Sheldon Keefe tweaked his top-6 forward group during the first intermission, reuniting Tavares and Nylander, and slotting Mitch Marner alongside Matthews.
''I don't think a lot had to be said (in the intermission) other than pointing out the obvious, but it's on the players,'' Keefe said. ''They did the talking and, more importantly, just came out on the ice way more focused.''
Toronto tied it at 5:07 of the second when Nylander scored off the rush after a nice play from Tavares.
''We decided to battle and compete a little bit more,'' Nylander said of the team's play in the second period. ''That's what took over the game.''
Lee put New York back ahead 1:10 later on a one-timer that fooled Samsonov for his 17th.
Toronto it on a power play at 7:53 when Samsonov caught the Islanders on a long change with a stretch pass. Nylander quickly fed Tavares, who moved in alone and backhanded his 21st goal of the season upstairs against his former team.
''I wasn't expecting it, to be honest,'' Tavares said of Samsonov's quick strike. ''Happy I got back onside because he sends it up there quickly.''
Keefe had a lot of praise for Tavares' play in the second period.
''Best period John Tavares has played all season,'' Keefe said. ''That got Willie going. Willie finished the chances and Willie was good. But I thought J.T. was excellent.''
The Leafs, who lost 3-2 in overtime to the Islanders here on Nov. 21, then took their first lead 1:40 later when Nylander used a delicate flip pass to send Jarnkrok in alone to score his 11th.
Sorokin stopped Michael Bunting's penalty shot later in the period, but Nylander buried his second of the night and 26th overall with 3:28 left in the middle period after stealing the puck from Scott Mayfield in the offensive zone.
Matthews sealed the win with his 25th at 7:44 of the third on a breakaway off a pass from Holl.
''Our details and our awareness cost us,'' Islanders coach Lane Lambert said. ''We've got to just absolutely get past that and clean it up.''
New York opened the scoring with 22.2 seconds left in the first when Lee swatted home a loose puck in the crease for his 16th after Brock Nelson's shot glanced off the Samsonov's shoulder and hit the post.
The Toronto goaltender was sharp on a number of chances earlier in the period, including a terrific blocker stop at full stretch on Casey Cizikas.
SAMSONOV ON A RUN
Samsonov made his third straight start and fourth straight appearance. Samsonov came in 14-4-2 record and a .919 save percentage, while Matt Murray was 11-5-0 with a .911 save percentage as part of Toronto's goaltending tandem.
DEBUTS AND RETURNS
New York D Samuel Boldoc made his NHL debut. The 22-year-old from Quebec had eight goals and 26 points in 40 AHL games this season. ... Also, Islanders F Kyle Palmieri and D Adam Pelech returned to the lineup after long injury absences.
Islanders: At Ottawa on Wednesday night to wrap up a two-game trip.
Maple Leafs: Host the New York Rangers on Wednesday night in the second of a five-game trip.
AP NHL: www.apnews.com/hub/NHL and www.twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.