The brain can influence its own emotion and humans can control their own emotions.
All you had to say
One explanation of the neurology behind lucid dreaming:
http://www.theassc.org/files/assc/2613.pdf
by Allan Hobson, Harvard Medical School
Lucid dreaming discussion begins on page 5, "What approach should we take to phenomenology?"
"...the dorsolateral prefrontal region, is conspicuously less activated than in waking. This specific deactivation may constitute the physical substrate of the cognitive incapacity of non-lucid dreaming.... Our lucid dream experiences must be based upon important changes in our brain function. A testable hypothesis is that our dorsolateral prefrontal cortex reactivates to near waking levels while our pons, limbic systems, and our temporal and posteralateral cortex remain sufficiently hyperactive to maintain the perceptual and emotional features of dreaming. In this way, we seize cognitive and volitional control of dreaming, a state in which these functions are normally weakened."
This explains what happens but not why it happens. Most people aren't randomly experiencing lucid dreams so not sure this is a satisfactory reply.