Some New Jersey high school students will soon be able to sleep in on school days with the best possible defense: It would be illegal to start school any earlier.

Gov. Phil Muphy on Friday signed a law that requires the state to experiment with starting high school after 8:30 a.m. in five yet-to-be-determined schools.

The change comes after years of advocates pushing for later high school start times because of research showing major health benefits for teenagers. Schools must voluntarily apply to the state Department of Education to be considered for the four-year trial (it’s unclear how soon it would begin).

“Adolescents are not getting enough sleep to live up to their full academic potential, and early school start times are to blame,” said Senator Richard Codey, D-Essex, who championed the proposal. “This isn’t just an idea, research backs up this problem.”

About 85 percent of New Jersey’s middle and high schools start before 8:30 a.m., according to Centers for Disease Control, and the dangers of sleep deprivation, including physical and mental health ailments, have come squarely into focus in recent years.

The American Academy of Pediatrics has suggested delaying school start times to align schedules to the biological sleep rhythms of adolescents, who need 8.5 to 9.5 hours of sleep on school nights.

Sleep-wake cycles begin to shift up to two hours later at the start of puberty, so it makes sense for high school student to go to sleep and start school later, the academy said.

“Our school schedules should reflect the needs of our students,” said Assemblywoman Valerie Vainieri Huttle, D-Bergen, another sponsor of the law. “So often, our children are attending school on far less sleep than what is medically recommended."

Despite the research, dreams of delaying school start times have always been met with a cold hard reality: Actually doing it could be a logistical nightmare.

Schedules for teachers, bus runs and after-school sports would all need to be altered, and there’s a potentially significant side effect for parents’ work schedules and younger siblings (whose schools could possibly start earlier to accommodate the change).

The New Jersey Association of School Administrators has previously said schools that pushed back start times received complaints from parents.

A separate issue is whether teens are already staying up too late and will only stay up later if schools start times are delayed. Along with later school start times, the CDC suggests parents take away cell phones and set regular bed times to make sure students fall asleep earlier.

The law requires the state to select at least one urban, suburban and rural high school and choose schools from different regions. The state must work with the schools to study the positive and negative consequences of the change, including the impact on transportation and extracurricular activities.

Adam Clark may be reached at adam_clark@njadvancemedia.com. Follow him on twitter at @realAdamClark. Find NJ.com on Facebook.

Have a tip? Tell us. nj.com/tips

Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.