Aiming at the problem that the capacity allocation study of the integrated wind-photovoltaic-hydrogen microgrid system does not fully consider the optimization of electrolyzer efficiency and multi-stack operation, which affects the efficiency of hydrogen production and the economy of the system. This paper presents a double-layer capacity allocation method for wind-photovoltaic-hydrogen integrated microgrid systems considering the optimization of the operational efficiency of Multi-Stack Electrolyzer Systems (MES). First, establishing the electrolyzer operating efficiency and life decay models, and linearizing them; Second, optimizing the installed capacity of wind power and photovoltaic to minimize net load and typical scenarios generated by K-means clustering; Next, Modeling the double-layer capacity allocation of microgrids, considering operation scheduling strategies at the inner layer to optimize MES operation efficiency, and optimizing the allocation of power to the electrolyzer for each period. The outer layer determines the results of the capacity allocation for hydrogen storage intending to maximize the combined daily return of the system. Finally, a simulation analysis is carried out based on a demonstration project example in Jiangsu province, validating the effectiveness of the method proposed in this paper for the improvement of MES operation efficiency and microgrid integrated revenue.