The association between the moon and madness has been around for centuries, with some believing that lunar phases influenced mental instability. This association is reflected in words like "lunatic," "lunacy," and "lunar."
Therefore, while "loony" doesn't have a direct Latin root, it's ultimately connected to the Latin word "luna" through its history and meaning.