Laughter starts with activation of the ventromedial prefrontal cortex, which produces endorphins that are intended to alleviate pain. One study showed that within four-tenths of a second of exposure to something potentially funny, an electrical wave moved through the cerebral cortex, the largest part of the brain.