The seventh-seeded Seawolves (25-7) advanced to the second round of the NIT and will play at Iowa on Friday night.
The second-seeded Minutemen (21-12) led 25-21 with 7:05 left in the first half, but they didn't score again in the half. But Stony Brook scored the final 17 points heading into halftime and controlled the game the rest of the way.
UMass leading scorer Chaz Williams was slowed by foul trouble in the first half and a shoulder injury fighting through a screen early in the second. He finished with two points and six assists.
Freddie Riley, who scored his 1,000th career point, led the Minutemen with 16 points. Jameel Warney added 16 points for Stony Brook.