Both goals came in the first half at Sixfields, where Chris Hackett broke the deadlock with his sixth goal of the campaign before Roy O'Donovan put Northampton firmly in control.
Stanley started well and James Gray was thwarted by Lee Nicholls but they fell behind in the ninth minute when Hackett fired home a free-kick from just outside the box on his return after being rested for a couple of games.
The Cobblers created further chances through another Hackett free-kick, Ben Tozer fired over and Ishmel Demontagnac was off target. But the home side doubled their advantage on the half-hour mark when O'Donovan got the better of keeper Paul Rachubka before firing into the roof of the net.
O'Donovan, Demontagnac and Ben Harding all had chances as Cobblers finished the first half on top and they should have been further ahead at the break.
Stanley rallied after the restart with top scorer Romuald Boco and Gray having shots blocked but Northampton always had too much for the visitors who struggled to turn possession into chances. Even the introduction of experienced striker Francis Jeffers for his debut failed to give Stanley a cutting edge in attack.
Demontagnac should have added a third goal late on as Northampton ended the game in charge although it took a good save from Nicholls late on to deny substitute Will Hatfield.