) Eastern ( UTC-4 ) ZIP code 02642 Area code(s) 508 / 774 FIPS code 25-19295 GNIS feature ID 0619414 Website: http://www.eastham-ma.gov/ Eastham is a town in Barnstable County , Massachusetts , United States , Barnstable County being coextensive with Cape Cod . The population was 5,453 at the 2000 census.