Brendan Rodgers' side made it three victories from their last four Premier League games thanks to Castagne's goal of the season contender and a fine free-kick.
Leicester climbed to 10th place as they bounced back from successive defeats against Rennes and Arsenal.
Brentford's loss ended a run of two consecutive wins that had moved them eight points clear of the relegation zone.
Thomas Frank's team were without Danish midfielder Christian Eriksen, who was sidelined with the coronavirus.
Leicester took the lead in the 20th minute through from Castagne's bolt from the blue.
The Belgian defender, making his first appearance of 2022, took Harvey Barnes' pass and fired into the top corner from the edge of the Brentford area.
It was Castagne's first goal for almost a year after an injury-plagued spell.
The Foxes doubled their advantage in the 33rd minute after Maddison was bundled over by Mathias Jensen.
Dusting himself down, Maddison exacted revenge for the foul as he curled an eye-catching free-kick over the Brentford wall and into the top corner from 20 yards.
Since the start of the 2018-19 season, Maddison has scored 13 Premier League goals from outside the area, more than any other top-flight player.
Maddison almost netted again from distance early in the second half but this time David Raya was equal to his strike.
Brentford mounted a late revival and Leicester keeper Kasper Schmeichel made a superb save to repel Pontus Jansson's close-range effort.
Schmeichel was also called into action to keep out Bryan Mbeumo's header from Ivan Toney's cross.
Yoane Wissa reduced the deficit with an 85th minute blast from 20 yards but it was too late to salvage a draw.
Later on Sunday, Tottenham host London rivals West Ham in a significant clash in the race for top four places.