I think its highly probable that religion came about from drug use (pagan adleast) from there its a tool of politics. Whenever I have smoked large amounts of weed, I've gotten a bit spiritual even though I am an atheist. This isn't because the drugs unlocked another plain of the cosmos or extrasensory perception, its because of sensory alteration, heavy feeling of euphoria, and minor hallucinations.
I'm not so sure about they Stoned Ape hypothesis as to why language was invented, more likely it came about through the need of communication to describe a certain stone tool and how to make it, coordinate the hunt and warfare. But religion yes. Theres many references where tribal cultures used psychoactive drugs in attempt to get closer with the elements, nature, and the perceived gods that control it. (You just need to look up Peyote and history of cocaine for lots of references).
Since the Bible Torah and Koran steals a lot of things off pagan rituals and customs it is hypocritical for them to be against drug use as a lot of their views may have came about from drug use, but hardly any desert god (God of Israel) worshipers acknowledge or even know the history of their holy texts. But politics often influences religion (Pope) whether or not religious choose to believe that.