i dont think that dmt is responsible for dreams.
i never remember my dreams and no matter how heavy my dmt use before bed, i could never produce lasting dreams.
the brain is a crazy thing.
if you learn to harness it's power, you can do anything on a trip.
i remember in the olden days when i went through a heavy acid eating phase, there was one night i realized that if i concentrated hard enough, i could slowly make the items in the room disappear until i was all by myself.
bottom line is that on (and off!) psychedelics, your brain is capable of so much.
i doubt that dmt is ever produced in the brain until death occurs.
i really really doubt that dmt would be produced by any mushrooms or acid.