also hay-seed, 1570s, "grass seed shaken out of hay," from hay + seed (n.). In U.S. slang sense of "comical rustic" it dates from 1875. To have hayseed in (one's) hair was a common mid-19c. way in U.S. to indicate a country person.
The opinion of the court was delivered by Justice Hunt; the chief justice, in whose hair the Ohio hayseed still lingers, delivering a dissenting opinion (etc.) [The Chronicle, New York, Nov. 12, 1874]