Proton exchange membrane (PEM) electrolyzer can produce gases at the pressure suitable for direct storage into metal hydride cylinders, bypassing compressors, and other auxiliary components. For direct storage into metal hydride containers, hydrogen gas's pressure and flowrate must be well controlled. However, the PEM electrolyzer's time-variant and nonlinear dynamics call for an adaptive control to maintain its output performance. Therefore, in this paper, a model-free relay-feedback autotuning approach is proposed to tune a proportional-integral (PI) controller online. The controller determines the voltage supply to the electrolyzer to track a certain current setpoint, which corresponds to a constant hydrogen production rate. A gain scheduling approach is developed to pick up the right controller gain at different setpoints, minimizing the tuning frequency. A self-assessment algorithm is developed to determine the situations where the autotuner should activate to update the PI parameters, thus allowing the control system to be tuned autonomously. The autotuning PI control is successfully tested with a PEM electrolyzer setup. Experiment results showed that autotuner with gain scheduling could tune the controller parameters producing a desired transient behavior and is adaptive to the variations in setpoint and operating conditions.