Neighbors and city noise ordinance dictates when you can go to bed. Neighbors, city noise ordinance, work and school hours dictate when you have to wake up.
One of the reasons I had to leave SF was because the sleepable window was just too squeezed. Between people making noise in the evening, cars and motorcycles racing at night, and sunlight, cars, and construction in the morning, there just wasn't enough time to wind down (this can take a long time depending on chronotype) and get enough sleep.