You should carry sufficient amount of Hot water in thermos flask and shouldn't rely on other source as it could be contaminated and can be hazardous for the new born and if you need more in the mid of the journey then you could ask for hot water from food stall vendors or Railways canteen, where the train halts for a reasonable duration.
BTW being a medic, it's my duty to let you know that Mother's Milk is the best food any new born could get.