There are a lot of small motels along Route 1 between, say, Seabrook and Portsmouth. They're certainly not the fanciest, but they are sometimes quite affordable.
And I'm going to 'second' the Best Western in Seabrook. It's RIGHT off I-95, you've got Master McGrath's restaurant across the street, and the greyhound park just a couple hundred yards down 107 if you want some entertainment.