Well... what i will describe is only a theory, but for me makes sense.
Heaven and hell are described as timeless places we go after our death, and where we stay forever.
But time is relative. As every stoner knows, one minute can feel like hours... so what is one second for one people dont necessarily means one second for another.
Well... its believed that when our body is dying our brain is flooded with neurotransmitters and other substances, one of which is the DMT, a HEAVY hallucinogenic. And it makes the time to go slowwww.
So, i think both heaven and hell are states of mind, (or "trips" like some people would say) felt by people due the release of hallucinogens in the dying brain.
And, as every tripper knows, set and setting plays a fundamental role in the "trip". So, if a person was a good person, and had a positive view of the death ("when i die i will go to heaven"), then when it start to feel the hallucinations it will regard it as being in heaven. Yet if the people's view of the death were fearsome, the "trip" will be hellish.
And now enters the relativity of the time. For we, that are alive, the death of a person takes only few moments. But for the dying person, their "trippily" distorted perception of time may make this moments feels like forever. Forever being in hell of heaven.