Personally I like to think that there is truth to the folklore. I think in some cases people saw these other dimensional beings while under the influence of consuming "wine & spirits" and hallucinogenics but at the same time I believe some of them actually exist in Middle Earth. In any case I don't think our ancestors would just make up all of these "myths" out of thin air.