late 13c., "affected with periodic insanity dependent on the changes of the moon," from Old French lunatique "insane," or directly from Late Latin lunaticus "moon-struck," from Latin luna "moon" (see luna).
Compare Old English monseoc "lunatic," literally "moon-sick;" Middle High German lune "humor, temper, mood, whim, fancy" (German Laune), from Latin luna. Compare also New Testament Greek selēniazomai "be epileptic," from selēnē "moon." Lunatic fringe (1913) apparently was coined by U.S. politician Theodore Roosevelt.
Then, among the wise and high-minded people who in self-respecting and genuine fashion strive earnestly for peace, there are foolish fanatics always to be found in such a movement and always discrediting it — the men who form the lunatic fringe in all reform movements. [Theodore Roosevelt, autobiography, 1913].
Earlier it was a term for a type of hairstyle worn over the forehead (1877). Lunatic soup (1933) was Australian slang for "alcoholic drink."