The surge happened when people who were sleeping on the riverbank were trampled by other pilgrims.