The train had been travelling from Marsa Matruh to the Egyptian capital Cairo when it came off the tracks.