In Prague, the metro system runs 4AM to 0AM - all maintenance and upgrades are done in the four-hour window without revenue moves. It's a system that's an order of magnitude smaller (in revenue track length) than New York subway, though - I'm not sure how this would scale.