Light is an indicator to our body to wake up. If you pull an all-nighter and want to go to sleep, avoid the sunlight as much as possible.
Conversely, I like to sleep with the shades open, because I feel it's easier to wake up in the morning if there's natural light in my room.
Interestingly, the effect of light on the biological clock reverses in the middle of the night, so that light in the early morning tends to make the cycle shorter. Which I guess also makes sense since that's how it would have to work with jetlag.
I'd expect to fall quickly and pleasantly asleep after an all-nighter, but the combination of dawn, the pounding of my heart and racing of my mind actually leave me awake and thinking for an extra few minutes. It's possible that going to sleep in that state gives me extra insight on what I was working on, but it doesn't feel good.