The cost of large scale hydrogen production from electrolysis is dominated by the cost of electricity, representing 77-89 % of the total costs. The integration of low-cost renewable energy is thus essential to affordable and clean hydrogen production from electrolysis. Flexible operation of electrolysis and hydro power can facilitate integration of remote energy resources by providing the flexibility that is needed in systems with large amounts of variable renewable energy. The flexibility from hydro power is limited by the physical complexities of the river systems and ecological concerns which makes the flexibility not easily quantifiable. In this work we investigate how different levels of flexibility from hydro power affects the cost of hydrogen production.We develop a two-stage stochastic model in a rolling horizon framework that enables us to consider the uncertainty in wind power production, energy storage and the structure of the energy market when simulating power system operation. This model is used for studying hydrogen production from electrolysis in a future scenario of a remote region in Norway with large wind power potential. A constant demand of hydrogen is assumed and flexibility in the electrolysis operation is enabled by hydrogen storage. Different levels of hydro power flexibility are considered by following a reservoir guiding curve every hour, 6 hours or 24 hours.Results from the case study show that hydrogen can be produced at a cost of 1.89 e/kg in the future if hydro power production is flexible within a period of 24 hours, fulfilling industry targets. Flexible hydrogen production also contributes to significantly reducing wasted energy from spillage from reservoirs or wind power curtailment by up to 56 % for 24 hours of flexibility. The results also show that less hydro power flexibility results in increased flexible operation of the electrolysis plant where it delivers 39-46 % more regulating power, operates more on higher power levels and stores more hydrogen.