In contrast with what is commonly thought, the word “lunatic” was originally related mainly to epilepsy and not to insanity. Only in the Middle Ages, under the influence of nonmedical authors — above all Origen and some astrological writers of fourth and fifth centuries — the overlay between such pathologies related the term to madness. This shift demonstrates that since the Middle Ages there has been great confusion about the clinical features of epileptic attacks and maniacal episodes.
Moreover, the connection between epileptic seizures and the moon in past medical literature should be considered as an attempt made by classical rational medicine to contrast the beliefs and the traditions of divine/demonic possession through some kind of natural explanation.
The Disease of the Moon: The Linguistic and Pathological Evolution of the English Term “Lunatic”