It is stated in Interstellar that each one hour spent on Miller's Planet equals seven years earth time.
Cooper and his colleagues spend some time on the planet, and by the time they return, Romilly says that he has been waiting for 23 years, which means they must have spend three hours on the planet (highly doubted). But that's not the question.
How did Romilly survive 23 years on that Endurance? Did he have unlimited food supplies? What about the generated waste (if you know what I mean)? Did they just throw it all in space?