Unfortunately, most coaches do not have toilet facilities. You could use the station toilets when the trains halt. You could also find toilets in adjacent compartments..