I suggest that Joseph Smith's earliest direct encounters with God happened in mystical experience, or what is also known as altered states of consciousness.
Mormonism traces back its history in modern times to its founding prophet, Joseph Smith Jr., and his "First Vision." Joseph was a young farmer boy who lived in western New York, born in the early nineteenth century. This was the time of what's known as the Second Great Awakening, and where Joseph lived is known as the "burned-over district." It was a time of much Protestant religious excitement, revivals, reforms, and the formation of new religious movements and denominations (which eventually included Mormonism). A Restoration Movement grew in popularity in the area, which involved ideas of "restoring" a pure, primitive, uncorrupted, and original form of Christian faith.
It sounds like a pretty woowoo thing to say, really smacking of the "New Age." But this seems to be the skeleton in the closet that even physicists don't want to admit. But some have.
Many mystical paths in the world's spiritual traditions claim to lead one to a conscious merging, union, and a direct identification with Deity, the Sacred, Reality, the Universe, the Transcendent, with a first-hand experience of being God.