Eastham is a town in Barnstable County, Massachusetts. The population was 5,752 at the 2020 census. Eastham is known as the "Gateway” to the Cape Cod National Seashore, which was founded in 1961 by President John F. Kennedy to protect Cape Cod's coast from erosion and overpopulation. The town is the site of many beaches, both on the Atlantic and on Cape Cod Bay, as well as the Nauset Light