The Hydra uses one reaction to run away
The Hydra's "Reactive Heads" feature states that for every head beyond the first, the Hydra gains an extra reaction that can only be used for opportunity attacks. This means that the Hydra has one "normal" reaction, which would be consumed by Dissonant Whispers.
There are two reasons why the Hydra would not be able to use its extra reactions to move.
In the case of 5e, a specific rule always trumps a general one - in this case, Dissonant Whispers states that on a failed saving throw the creature must use its reaction to move away from you. However, the Hydra's Reactive Heads feature states that the extra reactions can only be used for opportunity attacks. This is a specific rule and trumps the general one.
Secondly, the wording of Dissonant Whispers states that the creature "must immediately use its reaction, if available, to move ..." In this case, we can consider the Hydra's extra reactions unavailable, because they can only be used for opportunity attacks.
In short, the Hydra will use its primary reaction to move away from the caster of Dissonant Whispers if it fails the saving throw, but the bonus reactions cannot be used in this way and as such it will hold on to them (possibly to take a big bite out of your front-liner barbarian).