I think part of what LSD does is to stimulate the brain in a way that makes more ideas seem like they provide a profound understanding or meaning.
No, what it does is remove the "anttention filter" from your brain. It doesn't cause hallucinations; it's just that there are many possible ways of interpreting your sensory inputs at any given time, and LSD removes the filter that rejects all but the most likely, thus your attention moves between them constantly. But of course physical senses are not the only inputs to your consciousness. You also get a constant analysis from whatever brain structures you've managed to build over your lifetime. These, too, are sent unfiltered to your consciousness on a psychedelic trip, which is why it might "unstuck" you when solving a problem.
It's not that LSD generates profound understanding, it's that it prevents you from tuning yourself out. You always had the ability to follow an idea and see what its implications are, but you were too busy doing whatever to bother, or maybe you simply didn't like them. LSD means you no longer have the ability to not follow them, and since everything is connected to everything else, you can start from almost anything and end up realizing very important (to you) things.
On the bad side, the brain structures responsible for detecting threats are also unfiltered, thus you can end up in a cascade of anxiety-fear-terror ("bad trip"). However, removing the filter also makes you more aware of how your mind works, thus a large dose of LSD might allow you to recognize fear as a simple neural circuit firing, which can be ignored; this kind of self-awareness helps deal with it after the trip ends, too, and would be quite useful for dying patients. It also extends to things like addictions.
I know in college we used to wander around campus and really be taken in by the details of architecture on campus buildings. I can remember being in a small, man-made concrete "amphitheater" and if you stood at the focal point of its shape you would hear a kind of perfect echo. Suddenly mathematics and architecture became unified in some kind of perfect synergy that was quite profound at the time. Later, of course, it was just a kind of ugly, modernist college campus landscape feature that nobody ever used for its theater-like purpose.
This is a good example of what I meant: an ugly piece of architecture still implies numerous things about physics, aesthetics, math, etc. People are simply trained to ignore them all, and dismiss the whole thing as "an ugly piece of architecture". That's more efficient, but also means you are missing almost everything around you - and are going to get a profound insight should you ever stop to look.