Hubert Humphrey in 1968 (63% compared to 33% for Nixon) did better in Massachusetts than home-stater John F. Kennedy in 1960 (60% compared to 40% for Nixon). Why?
Lingering sympathy vote due to the JFK assassination. Never really went away, that's what changed MA from a D-leaning swing state to safe Democratic.
Plus, Nixon ran a more moderate campaign in 1960 vs 1968, and I'm guessing that Catholics increased as a percentage of the population in those eight years.
Also, a lot of people in MA (including moderate/liberal WASP Republicans) were dovish on Vietnam.