The train on the north east corridor already do this. They use dynamic braking by reversing the polarity of the motors during down hill descents, sending the 600 to1200 amps back into the grid.
It is not all abput energy savings though. This keeps the cars bunched up when traveling down hill as opposed to using regular brakes which leave the cars stretched, thus causing a rough ride once the territory flattens out. It is too bad all the other trains in the country dont the run solely on electricity, so they energy produced by dynamic braking is just turned into heat.