Gillingham boss Martin Allen admitted his side were extremely relieved to end a run of five home games without a win on Tuesday night.
Cody McDonald netted from close range after Northampton goalkeeper Lee Nicholls misjudged a Matt Fish long ball to put the hosts ahead in the fourth minute of the League Two clash at Priestfield.
Myles Weston smashed in off the post to secure the win and Allen felt the players were deserving of a first home success since November 17.
He said: "You saw from Myles' celebration and the celebration of the whole team and in the dugout what it meant and you could sense the relief from all our supporters that turned out.
"The players deserve all the credit for the club to go top of the league and 10 points clear of fourth place is some going.
"The run that we have had here does start to get on everyone's back wherever you go. People do mention it but I have had to try and deflect and dilute that feeling.
"We have had two fantastic wins away at Southend and Bristol Rovers so when people talked about a crisis I didn't buy into that.
"We were due a bit of luck. It is sometimes difficult to play in front of your home fans when you have been top for four and a half months. Everybody raises their game but we are delighted to have won."