Filip Forsberg scored, Ryan Johansen and Matt Duchene each had two assists, and Juuse Saros made 31 saves for the Predators (39-25-4), who had won two straight.
Nashville remained three points ahead of the Dallas Stars for the first wild card into the Stanley Cup Playoffs from the Western Conference.
"They made it tough for us, especially in their own zone," Forsberg said. "They played hard, defended well, and obviously had opportunistic scoring when they needed to. The first period, I think, was not our greatest, but we found a way to come out of it 3-3, and after that, it was a pretty even game. … We didn't necessarily create as many chances as we wanted, which is something that we definitely have to work on but also have to give them all the credit for."
Olofsson put the Sabres ahead 4-3 at 14:25 of the second period with a one-timer from the right circle on the power play.
Krebs made it 1-0 at 2:14 of the first period, jumping on a rebound at the bottom of the left circle to end an eight-game goal drought.
Forsberg tied it 1-1 at 4:32, scoring on the rebound of a Duchene shot at the front of the net.
Thompson made it 2-1 at 6:58 with a snap shot from the slot before extending Buffalo's lead to 3-1 at 13:22 when his shot went in off the stick of Predators forward Tanner Jeannot.
"We just know how enthusiastic and how genuine this city is, and I think we have the same thing in our locker room, we have a lot of genuine guys," Thompson said. "Just a blue-collar group that's trying and earn back everything, earn back the respect of the fans. So just taking it one day at a time. I think tonight was a really big stepping stone."