We recently learnt about the concept of Form Constants - geometric patterns that regularly show up in vision during altered states of consciousness. According to various studies, these patterns reflect patterns existing in the physical structure of the brain. This would explain why some hallucinations (including the “light at the end of the tunnel”) are common to all cultures.
(the following may be imprecise and badly worded, improvements welcome)
Everything the eyes see maps neatly onto the visual cortex (this is also mentioned in the article about migraine auras shared here some time ago by @jimboburgess). However the visual field has a circular shape, while the visual cortex works as a plane, so this mapping is a polar coordinate mapping.
When we look to a spiral or a tunnel, neurons in the visual cortex get excited in patterns shaped not like a spiral, but like parallel stripes.
What happens when altered states of consciousness cause neurons in the visual cortex to get excited in parallel stripes, in absence of visual stimuli? We “see” spirals.
Striped and spotted patterns are common in nature (look up “Reaction Diffusion”, there are also many online simulators). In some cases neurons behave following such patterns, which would explain why spirals and other form constant are commonly visualized during hallucinated states.
Video of a talk with slides: