Students of California, go ahead: Hit that snooze button. A new law signed by governor Gavin Newsom on Sunday will push back public school start times in an effort to help kids get more sleep.

The law bars middle schools from starting before 8am, while high schools must wait till 8:30am to begin classes. This means that about half of California schools will need to delay their opening bell by 30 minutes or less, according to a legislative analysis (pdf), while one-quarter will need to wait an additional 31 to 60 minutes to get going.

Schools have until July 1, 2022 to comply with the rule, or whenever their three-year collective bargaining agreements with employees expire—whichever comes later. Some rural schools are exempt from the law, and the new start times do not apply to optional “zero period” classes.

The move makes California the first US state to heed the call of health advocates who argue that early school start times are forcing adolescents to operate in a state of perpetual sleep deprivation. The American Academy of Pediatrics, which backed the bill, said in 2014 policy statement that getting too little sleep puts teenagers’ physical and mental health at risk, as well as their academic performance. The organization cited research that shows that biological changes in puberty make it difficult for the average teenager to fall asleep before 11pm, and that teenagers need between 8.5 and 9.5 hours of sleep to function at their best. It recommended that schools adjust their schedules rather than compel students to go against their natural sleep rhythms.

Research shows that teens benefit immensely when they get more shuteye. One three-year study (pdf, p.1) of 9,000 high-school students across three states, for example, found that academic performance, “including grades earned in core subject areas of math, English, science and social studies, plus performance on state and national achievement tests, attendance rates and reduced tardiness show significantly positive improvement with the later start times of 8:35 AM or later.”

Theoretically, the reason schools start so early is to accommodate working parents’ schedules, a consideration that became particularly important when women began entering the workforce in droves in the later decades of the 20th century. The California senate’s legislative analysis explains:

“… [M]ost schools started around 9:00 a.m. until the 1970s and 1980s. The early start time is more closely aligned with parents’ work schedules, which became an increasingly important consideration, especially as both parents entered the workforce. An earlier start time accommodates the needs of families to have a safe place for their children after both parents leave for work.”

And so it should come as no surprise that the new law has its detractors. A spokesperson for the California Teachers Association warned that it will put families with parents who don’t have flexibility over their start times at a disadvantage.

“We know from experience that many of these parents will drop their children off at school at the same time they do now, regardless of whether there is supervision, and there is not enough funding from the state for before school programs to ensure the safety of students who will be dropped off early,” the spokesperson said.

Given that flexible schedules tend to be a privilege reserved for white-collar jobs, the law could have a disproportionate affect on lower-income students and parents. But it’s also worth noting that current school schedules are hardly ideal for many working parents. While early start times may suit those with a typical 9-to-5 schedule, a 3pm end time certainly doesn’t line up with the end of the workday.

The US isn’t alone in its penchant for nudging tired teens out of bed at morning’s first light. In China, middle-school-age children start classes at 7:30am, while high-school students in Brazil start at 7:15am. Sweden, a country often held up as a bastion of progressive educational policies, typically starts school around 8am, though researchers there have argued that schools should put off opening their doors till 9am at the earliest.