A federal judge has ordered more sleep and fewer nighttime interruptions for county jail inmates in one San Francisco Bay Area county after a group of inmates sued, saying lack of sleep amounted to cruel and unusual punishment.

Alameda County jails will no longer be allowed to make 2:30 a.m. announcements for inmates to take pills, have noisy overnight maintenance work performed or wake up inmates for 4 a.m. breakfasts following the preliminary injunction order granted Monday by U.S. District Judge James Donato, the San Francisco Chronicle reported.

Donato also ordered lights out at the county’s two jails for an extra hour during the week and for two more hours weekends and holidays. Before the order, the lights were only kept off from 11 p.m. to 4 a.m. Monday through Friday and until 5 a.m. weekends.

Donato’s decision is temporary but will stay in effect while the case progresses for the federal class action lawsuit filed by group of female inmates at the county’s Santa Rita Jail in the suburban city of Dublin against Alameda County and the Sheriff’s Office.