The power production of electrical Renewable Energy Sources (RES), mainly PV and wind energy, is affected by their primary source of energy: solar radiation value or wind strength. Electrical networks with a large share of these sources must manage temporal imbalances of supply and demand. Hybrid Energy Networks (HEN) can mitigate the effects of this unbalancing by providing a connection between the electricity grid and and other energy vectors such as heat, gas or hydrogen. These couplings can activate synergies among networks that, all together, increase the share of renewable sources helping a decarbonisation of the energy sector. As the energy system becomes more and more complex, the need for simulation and optimisation tools increases. Mathematical optimisation can be used to look for a management strategy maximising a specific target, for instance economical, i.e. the minimum management cost, or environmental as the best exploitation or RES. The present work presents a Mixed Integer Linear Programming (MILP) optimisation procedure that looks for the minimum running cost of a system made up by a large-scale PV plant where hydrogen production, storage and conversion to electricity is present. In addition, a connection to a natural gas grid where hydrogen can be sold is considered. Different running strategies are studied and analysed as functions of electricity prices and other forms of electrical energy exploitation.