Another option is to stay in Providence, RI near the Amtrak train station. There are several hotels there within reasonable walking distance.
During the week, the last Providence line commuter train leaves Back Bay station at 12 midnight. Gets into Providence for 1:11am. Take the Green Line from TD Garden to Copley and walk 2 blocks to Back Bay. You can also take the Orange Line directly into Back Bay.
Yes, you do have to allow for enough of time to get to Back Bay from TD Garden but the savings could be worth it.

. Worked for me during past US Nationals and Worlds held in Boston.
I now work IT Support at a financial services firm in Boston and have taken plenty of late night trains home. There’s more people on the train at that hour than you might think.