The helium used for cooling was liquid helium, it slowly evaporated, the resulting gas has to be vented to space to avoid a very high pressure and to optimize cooling.
Herschel used liquid helium cooling, too, but Hubble did not use helium.
The instruments were cooled with over 2,300 litres (510 imp gal; 610
US gal) of liquid helium, boiling away in a near vacuum at a
temperature of approximately 1.4 K (−272 °C)
Source Wikipedia article about Herschel
Hydrogen was not used for cooling, it is less cold than helium.
The Wikipedia article explains the use of helium for cooling.