Most dreams are just from our brains processing and running wild, as you state. But I do believe that God does give us dreams sometimes.
It can be either.
dreams have various functions, such as restorative properties. It's not signs from god, it's messages from your subconsciousness trying to tell you something about what you're doing in real life.
Just our imagination.