Horizontal section through midbrain
The mesencephalon or midbrain is a part of the brain stem. It is associated with vision, hearing, motor control, sleep/wake, arousal (alertness), and temperature regulation.
In the anatomy of developing animals, the brain forms from the neural tube, which turns into three vesicles. The mesencephalon (midbrain) is the middle vesicle, and becomes part of the brain stem.