It comes with practice over time. All of the games that I have made took about 3-5 weeks, and most are for my final projects for my college classes. Last year, I took a Rapid Prototyping game class where you practice different styles of ideation, and then you start making a prototype or a simple game in less than a week or two.
For the game jam that I submitted, it took me a few days to complete it, from the programming and my terrible art design lol (I probably should've ask for an artist but I also want to give art design a go). And yes, I do get my 8 hours of sleep cause I can't function without it. I basically can't use the other 5 days cause I am already going to be busy with clubs and other college works.
I think its great that the game jam is one week and the main focus is to design a small, playable game, and try not to over-scope things. It helps open up new and even experienced game designers and artists who never did a game jam before to try out or practice something new with their skills.