During the night, your brain's Circadian Rhythm tells your pineal gland to produce melatonin. Circadian Rhythms are basically, when you see light, your brain thinks you should be awake, but when you see darkness it thinks you should be asleep.
Dreams and be fascinating, scary, and downright weird. Everybody dreams even if we wake up and can't remember a single thing from our last night. But why does our brain have a fantasy or hallucination while we sleep?