"buffoon, clown," 1640s, from Middle English Thom Foole, personification of a mentally deficient man (mid-14c.), see Tom + fool (n.).
Stupid; foolish; nutty: some tomfool scientist
[1762+; found by 1356 as the actual name of a man, also called Thomas fatuus, ''foolish Tom'']