Every human in the world has a unconscious state of mind (ID) that they can not control. This is where your beast like instincts come into play. It's telling you get get all the desires you want like food and sex. It screams to you "I want it, I want it, I want it!" It just wants to be pleasured. Then elsewhere in your mind, you have your superego. This is your controlling side that keeps you into check. Your ID wants sex right now but your superego hold it back saying no you can't have it here, it's wrong. No you don't need food, you're full. It's more of a moral compass. Together, your superego and your ID comes together to form your Ego, how you act. It will gratify your ID in the long term while sticking to the superegos rules.
I believe while you're asleep, your superego, the mind you picked up from the environment and naturally starts to dissipate as you lose control. Your ID takes control and your mind runs rampant thinking about your desires. This explains Nocturnal Emissions. Sleeping allows us to delve into the mind we cannot reach while awake and using this power, the dream can make us feel we are there. Thus dreams to me, are our mind trying to subconsciously achieve our deep desires we hold back in the real world.
Lucky enough for me, I remember every dream that I have every night. It's pretty cool yet chilling at times like last night was creepy. There was a sentient machine that had a bronze face on a floating sphere. In the sphere there were people that it took. It said if I leave he will kill them but if I talk to him and convince him, it might let them go. The sky was blood red as well and I was on a cobblestone bridge floating on nothing in nowhere.