After early Stanley pressure the Cobblers took the lead with their first real attack on 17 minutes. A short corner found Joe Widdowson on the left and he played a perfect ball in for Akinfenwa to head home.
Lewis Wilson rifled an effort against the crossbar minutes later and Stanley made the visitors pay after 37 minutes when Lee Molyneux cut the ball back for George Miller on the edge of the area, and he curled through a body of players to nestle into the bottom of the net.
Stanley's Rommy Boco then gave his side the lead after the break when he raced through from midfield and unleashed an effort which flew into the top corner and gave Lee Nicholls no chance.
Aidy Boothroyd introduced striker Jake Robinson for Clive Platt just after the hour mark and within four minutes he had changed the game. Akinfenwa got the ball in the area and, with bodies around him, powered his way through before squaring for Robinson to fire home.
The Cobblers were ahead just two minutes later when Emyr Huws' looping cross caught the Reds static waiting for offside but the unmarked Akinfenwa headed home his second of the game. Akinfenwa completed his treble on 76 minutes when a long throw caused chaos in the Reds' area and the powerful striker chested the ball down before volleying home, with Robinson then hitting the outside of the upright as the visitors took complete control.