On the flip side, if you work in Massachusetts but live in New Hampshire and work from home some days, you don't have to pay income tax on the days you worked from home (NH has no state income tax)
And yes, if you work in MA and live in NH, you pay MA income tax. Also, if you live in MA and work in NH, you pay MA income tax.