Disconnected groups dealing w oxygen rationing underground. Some share oxygen equally, some have upper class getting more, lower class (called “sleepies”?) getting less. The protagonists (two kids?) find a group w a lower class completely comatose in a dark cavern. They ultimately reach the surface.
Would it be this?
https://www.goodreads.com/book/show/11544466-breathe
I couldn’t find anyone in comments giving plot spoilers, but it seems to be your concept.