I've also wondered this for many years. My understanding is that early on it was Puritans but by 1800 it was a mixture of Episcopalians and Congregationalists (some of them being Unitarians) The shift to Congregationalism I can understand, but I've never been able to find exactly how so many became Episcopalians.
Could wealth be a factor?
Perhaps, though my understanding is that there were many wealthy Congregationalists.
I understand the Puritan -> Congregationalist pipeline. I thought Puritans had a fairly decentralized polity so I can see how a couple generations of liberal theology would lead to Congregationalism. A movement from Puritanism to Episcopalianism is harder to envision.