A spongy material is installed to the inside helmets called the Valsalva device (top right in this image)
allow astronauts to do the Valsalva maneuver to relieve pressure on their eardrums when there is a pressure differential.
Samantha Cristoforetti demonstrating Valsalva device.

When do (did) the astronauts generally use this device to relieve the pressure, during ascent, descent, and/or while their spacecraft was in the vacuum of space. If the astronauts used it during ascent or descent was there a common altitude, or a range of altitudes, it was generally used?