I've only been on relatively short D and G trains, (i.e., Shaoxing-Zhenjiang, ~4 hours), and the only meals I recall seeing are the rice boxes. I presume the same is provided on the overnight trains. I'd just eat at one of the franchise restaurants in the stations. For Chinese options, Mr. Lee and Kungfu have always been consistent, and they do open early.