It is likely that this practice has existed for millennia; and that it is more a self-induced ecstasy than any kind of actual action of God upon the person. It is thought that 'prophets' in the Old Testament time may have done such things to try to induce visions. The prophets of Baal do something similar here:
Midday passed, and they continued their frantic prophesying until the time for the evening sacrifice. But there was no response, no one answered, no one paid attention.
Here's something from an Orthodox source on the issue: http://www.goarch.org/ourfaith/ourfaith7112
It appears St. Paul was questioned about the working of the Holy
Spirit through the Gifts. Corinth was greatly influenced by Greek
paganism which included demonstrations, frenzies and orgies, all
intricately interwoven into their religious practices. In post Homeric
times, the cult of the Dionysiac orgies made their entrance into the
Greek world. According to this, music, the whirling dance,
intoxication and utterances had the power to make men divine; to
produce a condition in which the normal state was left behind and the
inspired person perceived what was external to himself and the senses.
In other words, the soul was supposed to leave the body, hence the
word ecstasy (ek stasis). They believed that while the being was
absent from the body, the soul was united with the deity. At such
times, the ecstatic person had no consciousness of his own.
The Corinthians of Paul's time were living under the influence of
Dionysiac religious customs. It was natural that they would find
certain similarities more familiar and appealing. Thus the Corinthians
began to put more stress on certain gifts like glossolalia. No doubt
the Apostle was concerned that their ties and memories of the old life
should be reason enough to regulate the employment of Glossolalia.
While not utterly identical, these ecstasies - which is the only really good term we have for it in English - have an origin in common human natural religious yearnings. They are not specifically Christian but reflect the person's desire to be a instrument of God, even to the point of frenzied ecstasy.