Marc Savard and P.J. Axelsson scored in regulation for Boston, which avoided its longest losing streak of the season. Derek Roy and Jochen Hecht scored for the Sabres, losers of a season-high three straight.
Ryan Miller stopped 35 shots for Buffalo, including an exceptional diving save with his stick on a shot by Paul Mara late in the second period. But he couldn't get his stick on Sturm's shot in the shootout.
The teams each scored two goals in the opening period and remained tied until overtime despite some good chances on both ends.
Miller made his highlight save on Mara with just more than three minutes left in the second period. Mara, who hustled down the middle to turn a 2-on-1 break into a 3-on-1, fired a shot at what appeared to be an open net. Miller dove across from the right post and the puck hit off the centre of his stick while he was airborne. The puck dropped into the crease and Miller covered it up for a faceoff.
Tim Thomas made 34 saves for Boston.
Boston jumped ahead 1-0 at 3:23 of the opening period when Savard scored off the rebound of Zdeno Chara's shot from the edge of the right circle, slipping a wrist shot into the right post.
The Sabres tied it 2:34 later when Roy collected Daniel Paille's rebound along the goal line and scored on a tough angle, slipping a shot inside the far post.
Hecht scored off the rebound off Roy's shot, pushing Buffalo ahead 2-1 midway into the first period, but Boston answered with Axelsson's goal with just under a second left in the first period.
Axelsson was credited with the goal when the rebound of his shot caromed off Sabres' defenceman Jaroslav Spacek's leg and between Miller's pads. The game clock showed no time remaining, but, after a reply review, the goal was allowed and the officials put seven-tenths of a second on the clock.
Notes: Boston's Shean Donovan hit the left post with just over eight minutes left. ... The teams meet again in Buffalo on Wednesday night. ... It was a 1 P.M. ET start for the Martin Luther King's Birthday holiday. ... The Sabres dropped to a league-best 17-5-1 on the road.