Frost made it 3-1 at 19:21 when he took a pass from James van Riemsdyk, dropped the puck between his skates and scored from the right side of the crease, and Hayes made it 4-1 at 2:30 of the third period on a one-timer from the slot.
Vatrano cut it to 4-2 at 18:51 when he redirected Kevin Shattenkirk's shot for a power-play goal.
Hayes completed his hat trick when he scored into an empty net with 44 seconds left for the 5-2 final.
He said he knew his teammates would be looking to get him the puck once Stolarz was pulled.
"We didn't really care who got it, but I'm sure Wade (Allison), [DeAngelo], Cam (York) and 'Laughts' were trying to find me," Hayes said.
NOTES: The Flyers lead the NHL with nine short-handed goals. Laughton, who had two assists and was plus-3, leads the NHL with seven short-handed points (three goals, four assists). ... Allison and Philadelphia forward Travis Konecny each had two assists. ... Flyers forward Patrick Brown led all skaters with five hits in his 100th NHL game. ... It's the third time the Ducks have lost five in a row (0-4-2 from Nov. 25-Dec. 4; 0-6-1 from Oct. 15-28). ... The win was Tortorella's 692nd, tying him with Dick Irvin for 12th in NHL history. He is 692-560-139 with 37 ties in 21 seasons with the Tampa Bay Lightning, New York Rangers, Vancouver Canucks, Columbus Blue Jackets and the Flyers. … Ducks defenseman Cam Fowler and forward Troy Terry each was minus-3.