Many think this phonomenon occurs because you worked so hard all day, and some others say this is a kind of "busy dream" that's mentioned in the Bible, in Ecclesiastes 5:3. "A dream comes with much business."
In my book, Dream Interpretation ToolKit, we address different patterns of dreams. Knowing a dream's pattern can be a huge clue to find the correct interpretation. These "working" dreams fall into the Job 33/Symbolic pattern and are given to urge you to sort through troublesome issues.
Thinking you have this kind of dream because you worked too hard is a great little way to sum it all up, just make it simple, put a bow on it and be done. Somewhere really close, though, I hear a buzzer going off that tells me that was the wrong answer. "Well, then, if it's not the obvious thing, what does it mean?" you ask. Great question.
Here's a really big point.
The Lord likes to make things hard. He does it on purpose. He wants you to seek Him.
Dreams are symbolic. The Lord uses those things in our natural lives to teach us about spiritual matters, and He uses symbols.
Remember the story in Matthew 16, when Jesus and the disciples were crossing the Sea of Galilee, and the disciples were chatting that they had forgotten to bring bread for the trip? Jesus spoke from the other end of the boat, "Beware of the yeast of the Pharisees and Saduccees." The disciples thought he must be talking about bread, since after all, that's what they were discussing. But no, that wasn't it. That was too simple, too obvious, like we said at the beginning of this post.
Jesus was using their natural circumstances to teach them about spiritual matters, and He does the same with us, all the time.
So, if you work as a cook and you dream of cooking all night, your dream has a symbolic meaning. It could mean something like you were cooking something up in your heart or mind that day, and it could have a negative connotation. If you work in a bank and you count money all night in your dreams, they are also symbolic, and could mean that you are considering the value of different treasures in your heart, like whether to do the right thing in a situation and reap treasures in Heaven, or do the wrong thing and reap treasures on earth.
To correctly interpret your dream of working all night, consider what that work could symbolically mean. Dream Interpretation ToolKit has a Symbol Dictionary to help you figure these things out. Then pray and ask for correct discernment, and consider what happened the day before that was troublesome to you. That's likely the root of the topic your dream is addressing.