Stuart Lewis scored his second goal of the season to give Ainsworth's side the victory that took them past the 50 point mark for the season to almost certainly ensure survival.
He said: "It was a huge win for us after the defeat on Saturday and although we are not mathematically safe I think I will finally be able to sleep.
"We have been looking for three points for a while now and after losing in the last minute against Accrington on Saturday we needed to bounce back and we did just that.
"It was a great performance from the lads against a side who have lost only once here in six months.
"The conditions were difficult but we showed an unbelievable togetherness all over the park to fight for the win. Stuart Lewis doesn't score too many but he picked a great time to pop up and score and I am absolutely delighted."