Craig Lindfield's late goal settled the League Two encounter and kept the Cobblers looking over their shoulders at the relegation zone.
Cook however felt his men were matched all the way by their opponents and said: "I think Northampton were the best team we have played and so to come away with the victory is extremely satisfying.
"We worked hard and probably got a bit of luck. Obviously it is a great feeling to have got that first win."