lunatic (n.)
A lunatic is a madman, in the loose and old-fashioned way the word is used now. It comes from the Latin luna, moon, through the Late Latin lunaticus, moon-struck.1
The idea behind it was a medical one: that some kinds of madness came and went with the phases of the moon, and that the moon was what moved them.1
The belief went, and the word stayed in the law long after it. English statutes used lunatic as a legal category into the twentieth century, and it was the Mental Treatment Act of 1930 that turned lunatics, officially, into patients.2
Nobody who uses the word now is thinking about the moon.
Some lunatic overtook us on the bend.