Hayes put the Flyers ahead 2-1 at 9:45 of the first. Sedlak won a face-off in the left circle to Hayes, who beat Sorokin over his glove with a quick wrist shot.
Hayes was playing on a line with Sedlak and Joel Farabee for the second straight game. In the Flyers' 5-2 loss at the Islanders on Saturday, Hayes had two assists, Sedlak had a goal and an assist, and Farabee scored.
"I love playing with 'Beezer,'" Hayes said. "I've played with him for a while. ... 'Sedsy' hounds the puck and tries to get it to us and enjoys doing that, so it's a good combination."
Hayes scored an empty-net goal with 34 seconds remaining for the 3-1 final.
Philadelphia outshot New York 12-7 in the third, a period in which it had been outscored 29-18 entering the game.
"That's one of our more complete games," Flyers coach John Tortorella said. "We talked about between the second and third in the coach's room that we need to finish a game now. We make it harder on ourselves with undisciplined penalties toward the end, but we have a really great penalty kill there, Carter makes a couple of big saves, and we find our way. ... That's a really good stepping stone for us in understanding how to finish games.
"Are all our problems solved? Absolutely not. But I'm glad for them because they have played hard and they have not been rewarded. You have to do more to win in this league. We did tonight."
NOTES:Islanders forward Josh Bailey took warmups but missed the game because of an upper-body injury, and forward Cal Clutterbuck left the game with 4:01 remaining in the first period because of an undisclosed injury. Lambert did not have an update on either player after the game. ... Islanders forward Brock Nelson, who was playing in his 700th NHL game, had an assist. ... It was Sanheim's first short-handed NHL goal. ... Flyers forward Scott Laughton had three shots and one hit in 18:42 of ice time in his return after missing four games because of an upper-body injury. ... Philadelphia defenseman Tony DeAngelo did not play because of a lower-body injury. Tortorella did not have an update postgame.