California students can look forward to extra sleep in the morning once a new law takes effect.

The law, signed on Sunday by Gov. Gavin Newsom, pushes back the start times at most public middle and high schools, making California the first state to order such a shift.

Classes for high schools, including those operated as charter schools, will start no earlier than 8:30 a.m. under the law, and classes for middle schools will start no earlier than 8 a.m.

The law, which came amid rising worries about the effects of sleep deprivation on young people, is intended to improve attendance rates and reduce tardiness, said Anthony J. Portantino , a Democratic state senator who wrote the bill.

“Everybody is looking for a magic bullet with education, one that cuts across all demographics, all ethnicities and that actually has a positive, measurable increase in test scores, attendance and graduation rates without costing money,” he said in a telephone interview. “And this is it.”