BUFFALO, N.Y. -- Drew Stafford broke out of his scoring slump with a highlight-reel goal at a critical moment.
''You know, long time coming,'' Stafford said. ''I had to stick with it, and sooner or later one was going to have to go in. I'm getting my shots, getting my chances.
''To be able to do get one there to help contribute to a win makes it even better.''
Stafford raced down the right side of the Boston zone and went around the net to score just his third of the season.
''The shallower nets allow for those wrap-around goals to be a little more effective,'' Stafford said. ''Just trying to get it through. Sometimes it works. Sometimes it doesn't. Fortunately tonight it went in.''
''We deserved a better fate, I think, than what happened,'' Bruins coach Claude Julien said. ''I thought we controlled the game pretty good, but their goalie made some pretty big saves to keep them in the game.''
The Sabres continue to show much better form after winning just six of their first 30 games. Buffalo is 3-1-1 in its last five and has scored four goals in consecutive games.
''We've been coming together,'' Foligno said. ''Goals have been coming together. If we're putting the work in, points will start happening. That's what guys are believing in. That's the system here, and everyone's on board.''
The game's start was lackluster, with one goal and just 13 shots combined in the first period.
Flynn stripped the puck from Johnny Boychuk in the neutral zone and used his backhand to score on the ensuing breakaway. It was Buffalo's first short(equals)handed goal of the season, and Flynn's first goal since Oct. 26.
''One thing about Flynn is he has a real quiet demeanor about him,'' Sabres coach Ted Nolan said. ''Sometimes you don't even know he's at practice unless you just watch him. He's so quiet, but he was sure loud tonight, the way he played.''
The Bruins tied it 1-1 with a short-handed goal of their own when Marchand beat Miller between the legs on a 2-on-1 break 1:50 into the second period.
Marchand added another goal less than two minutes later when his one-timed shot knuckled over Miller's right shoulder.
''It's obviously nice to get one or two, but all that matters is we lost,'' Marchand said. ''I thought that we had a pretty good game and we could've deserved more, but we've got to regroup and play better the next game.''
The Sabres forged another tie with 2:49 left in the second period. Jamie McBain's errant wrist shot struck Foligno in the chest, and the forward tapped it in for his second goal in two games.
''I'll take anything off the stomach in,'' Foligno said. ''That's for sure. They don't ask how, they ask how many. It's good just to go to the net and be rewarded.''
Myers put Buffalo ahead 4-2 when he sent a high wrist shot past Johnson with 4:22 left in the game.
''The floodgates are opening a little bit,'' Myers said. ''We just have to make sure we keep staying consistent and making sure we're doing the little things that are giving us those opportunities to score that many goals.''
Buffalo's penalty killers were perfect for the sixth straight game, a streak that includes 14 power plays against.
Buffalo lost leading scorer Cody Hodgson to an upper body injury late in the first period. He blocked Torrey Krug's shot with his wrist and didn't return.
''Could be a little while,'' Nolan said when asked how long Hodgson would be out.
The Sabres acquired LW Linus Omark from Edmonton for a conditional sixth-round pick in the 2014 NHL draft. ... Bruins LW Daniel Paille missed the game as he continues to recover from a concussion. ... The Sabres scratched LW John Scott and D Chad Ruhwedel.