City sit top of Group A, one point above Paris Saint Germain, after their third win in four matches in the competition.
Last season's Champions League runners-up are five points clear of third-placed Brugge and will reach the knockout stages with one point from their last two games against PSG and Leipzig.
Returning to winning ways was the ideal preparation for Saturday's derby against Manchester United at Old Trafford.
After a strong start to the season, City had suffered their worst period of the campaign.
Saturday's shock home defeat against Crystal Palace came hot on the heels of a penalty shoot-out loss at West Ham that ended their four-year reign as League Cup holders.
Guardiola responded to those setbacks by defiantly claiming City were playing at an "incredible" level, labelling their current form among the "best moments" of his time at the club.
Having thrashed Brugge 5-1 in Belgium last month, City once again picked on Philippe Clement's team, although the victory wasn't without a few scares.
Guardiola had described Brugge's visit as "much more important" than the Manchester derby and his players got the message.
Kevin De Bruyne's inconsistent form of late has been a concern, so it was intriguing to see Guardiola drop the Belgian midfielder.
Even without De Bruyne, City had too much attacking quality for Brugge.
Joao Cancelo was a constant menace and the left-back was inches away from scoring with a curling effort that cannoned off the post.
City's relentless pressure was rewarded in the 15th minute after Foden's initial cross-shot was blocked by Brugge keeper Simon Mignolet.
Mahrez pounced on the loose ball and jinked across the Brugge area before picking out Cancelo, whose cross found Foden narrowly onside to tap-in his fifth goal this season.
But despite their dominant start, City were rocked as Brugge equalised in freakish circumstances two minutes later.
Hans Vanaken's shot was clawed away by Ederson and when Charles De Ketelaere crossed back into the six-yard box, Bernardo Silva's attempted block deflected the ball off Stones' face and into the net.
That shock knocked City out of their stride and they nearly conceded again when De Ketelaere's low drive forced a good stop from Ederson.
Jack Grealish's deft pass presented Mahrez with a golden opportunity early in the second half, but Mignolet saved the Algerian's close-range strike.
Brugge threatened again when De Ketelaere's shot crept wide.
But City had regained control and Mahrez made amends for his earlier miss as he restored their lead in the 54th minute.
Cancelo was the provider with a pin-point cross that the unmarked Mahrez headed past Mignolet from five yards for his eighth goal this season.
Sterling was introduced to replace Mahrez and the England star was quickly on the scoresheet for the first time since August.
In the 72nd minute, Foden found Ilkay Gundogan and the German's low cross was converted with ease by Sterling for the forward's second goal of a difficult season on a personal level.
Brazil forward Jesus put the seal on City's victory when he netted in the final seconds.