1580s, "state of being insane," from Latin insanitatem (nominative insanitas) "unhealthfulness," noun of quality from insanus (see insane). Meaning "extreme folly" is from 1844.
early 15c., "healthy condition," from Middle French sanité "health," from Latin sanitatem (nominative sanitas) "health, sanity," from sanus "healthy; sane" (see sane). Meaning "soundness of mind" first attested c. 1600.