those long periods of isolation and limited novel stimuli that were presumably common in pre modern times probably had a similar effect as the various mild hallucinations you experience during a long meditation session. Also, I don't have a source for this due to Google's fuzzy keyword matching and my efforts limited to about 90 sec but IIRC even Nietzsche had pondered if miracles were previously more common due to dietary deficiencies causing hallucinations.
I do agree though that it is interesting and even with a simple materialist explaination, the fact that people would see similar diminutive mythical people across cultures is fascinating. Hawaiians had menehune, etc etc. I tend to think of that in the Joseph Campbell collective unconscious sort of way.