Being trapped in a dream usually reflects a feeling of helplessness in some part of your waking life -- a job, a relationship, or a routine where the exits don't seem to exist even though logically you know they must. The specific place you're trapped in often mirrors exactly where that stuck feeling is coming from.
The eye sees only what the mind is prepared to comprehend. (Henri Bergson)