"... There's also the science of coming out of unconsciousness to consider. A new study shows it's not simply a matter of the anesthetic "wearing off."
Researchers from UCLA say the return of conscious brain activity occurs in discrete clumps, or clusters — and that the brain does not jump between all of the clusters uniformly. In fact, some of these activity patterns serve as "hubs" on the way back to consciousness.
"Recovery from anesthesia, is not simply the result of the anesthetic 'wearing off' but also of the brain finding its way back through a maze of possible activity states to those that allow conscious experience," noted researcher Andrew Hudson in a statement. "Put simply, the brain reboots itself."
Relatedly, a separate study from 2012 suggested that post-surgery confusion is the brain reverting to a more primitive evolutionary state as it goes through the "boot-up" process....." from http://io9.gizmodo.com/how-does-anesthesia-work-doctors-arent-sure-and-her-1592809615 suggests hppd may be failure to reboot.
".....Researchers discovered that when LSD latches onto the brain cell’s serotonin receptor, part of the receptor folds over the drug molecule like a lid, locking it in place.
“We think this lid is likely why the effects of LSD can last so long,” said Roth, who also works at the UNC Eshelman School of Pharmacy.
But, while lengthy, acid trips aren’t forever. Some LSD molecules pop off their receptors as the “lid” part moves around. And brain cells eventually respond to the drug molecule by pulling in its serotonin receptor, along with the drug, where the drug is then degraded or disassembled....." from http://www.newsobserver.com/news/local/education/article129016534.html suggests hppd may be some disruption of this mechanism, perhaps a constant recycling of the drug at the receptor?