I have no idea about this really, I always assumed that dreams were just memories and thoughts that were assembled together and shown via mental images while our bodies rest. Pretty much just a way for the body to sort out stuff, like a filing cabinet in a way.