I asked it somewhere else and they said that it could be because of vram, but if it was so I think it wouldn't start working again and render the same scene with even more models on it.
Well, it depend. Not because the VRAM would have one or more damaged bank(s), since it will not magically repair, but thinking about the hardware, "damaged something" isn't the only possible factor.
I don't say that it's the case for you, but heat is also an important factor. Some cards with NVidia GPU have sensor for the RAM temperature, in top of the one for the GPU temperature. So technically speaking it can be the VRAM without being a question of damaged banks. NVidia GPUs and their drivers also have two "slowdown mode", one purely based on software, and one hardware based, triggered automatically to protect the GPU.
I never experienced the slowdown modes or a too heavy temperature, but I guess that it would have the same effect than an out of date driver; Daz Studio starts to render on GPU, since it found one, but end with a black render since the GPU answer something like "I'm Sorry Daz, I'm afraid I can't do that".
But, while it's a possible cause, I doubt that it's what you experienced, reason why I don't talked about it at first. As you describe the issue, there were a full night between the "it render" and the "it don't render" situation. So, for the heat or slowdown mode to be the cause, it would have needed that you had an intensive use of the GPU, then decide to start rendering right after this. And when I say "right after", I mean something like few seconds, since in generic condition a full minute is already good enough for the heat to lower and/or the cause of the slowdown mode to disappear.
Or...
(sorry, I think while I write), the cause was electric... Some irregularities or peaks for the power unit. I guess that it could trigger the slowdown modes.