Semyon Varlamov made 20 saves as the Islanders improved to 9-0-2 at Nassau Coliseum this season and 14-6-4 overall. Cal Clutterbuck, Brock Nelson and Anders Lee also scored.
New York beat Buffalo for the fifth straight time this season, outscoring the Islanders 19-7 in those five meetings. The teams meet again Sunday for their third game in four days in the same venue.
Buffalo dropped its sixth straight game. Sam Reinhart and Jacob Bryson scored for the Sabres, and Carter Hutton made 24 saves.
Bryson put Buffalo in front when he scored his first career goal 33 seconds into his sixth game. The 23-year-old Bryson was selected by the Sabres in the fourth round of the 2017 draft.
But the Islanders responded with four goals in the second, including a memorable play by the speedy Barzal.
The 23-year-old Barzal tied it at 3:51 with his ninth of the season. After outmuscling Sabres defenceman Rasmus Ristolainen for the puck, Barzal hesitated in front of the net and then backhanded the puck between his legs to himself before sliding it past Hutton.
Barzal has three goals and four assists in the last six games.
Brock Nelson made it 2-1 at 5:16, taking a cross-ice pass from Anthony Beauvillier and firing a high shot past Hutton for his seventh goal.
Cal Clutterbuck extended the lead at 8:45, sending a wrist shot past Hutton for his second goal this season.
Mayfield made it 4-1 with his second goal of the season at 15:29, firing another high shot past Hutton.
Reinhart scored his team-best ninth goal 52 seconds into the third on the power play before Lee added his team-leading 11th goal at 2:15.
The Islanders are in a stretch in which they are scheduled to play 19 games in 33 days for the first time in franchise history. The Islanders are 5-0-1 thus far in this stretch.
The Islanders have three players with consecutive game streaks of last 250 games: Lee 292, Brock Nelson 269 and Barzal 256. Lee is nine games from tying Bob Nystrom for the second-longest such streak in Islanders history.