The study of dreaming is a big field of scientific endeavor. Although this topic is very interesting, I do not wish to rehash all the theories in this post. Let me mention four different views of dreaming:
Freud thought that dreaming was a way to access that which our consciousness hides from us; Carl Jung thought that the explicit content was more important than symbolic content and was a way for the mind to organize relationships and experiences from our waking life.  The activation-synthesis hypothesis of Hobson and McCarley posits that dreams result from brain activation during Rapid Eye Movement (REM) sleep. They did not think that neuronal discharge was random since if that were the case, it could not explain recurring dreams. ,  “Continual-activation theory challenges activation-synthesis theory by arguing the brain actually uses different mechanisms for REM sleep than for dreams. The theory was published by Jie Zhang in 2004.” 
Where does creativity come in?
One particular dream that inspired a scientific discovery was that of August Kekule, who had been working on the nature of the chemical bonds in benzene. He dreamed of a snake chasing its tale which led him, as the story goes, to discover the ring-structure of that molecule.
None of my dreams ever led to any discoveries, but I enjoy them for their entertainment value. This is where my creativity comes in. I have certain types of dreams with numerous variations.
There is the I-am-not-prepared dream. These very realistic dreams include those where: 1) I forgot all about a final exam, to be given the next day; 2) I forgot about an entire course that I was enrolled in and didn’t study the entire term; 3) I am supposed to give a speech and I haven’t written it. Ok, not so creative on this count, but I’m sure there are a number of variations that I have forgotten.
There are the balancing-on-a really-tall-stack-of-books dreams. It doesn’t have to be books, it just has to be tall and I have to be precariously balanced. Brrrr…. I don’t even want to think about those.
The converse of these types of dreams are those looking up at tall buildings. The other day, I dreamed about a tall, very narrow building that I could see swaying. Different wings of the building jutted out perpendicular to the vertical, and they were slowly swinging around. I saw an apartment in one of these wings rotating like one of those chicken rotisseries that you see in a grocery store. I couldn’t imagine how anyone would care to live in such a situation.
Not to abandon a successfully scary dream premise, a few nights later I dreamed I was at a party in one of those apartments.
I suppose my mind discovered a hybrid type of dream, between the looking-up-at-a tall building dream and the precarious-balance dream.
I wonder what I am trying to tell myself.