This study investigates how hilly road profiles affect the optimal energy management strategy for fuel cell hybrid electric vehicle (FCHEV) with various battery sizes. First, a simplified FCHEV model is developed to describe power and energy flows throughout the powertrain and evaluate hydrogen consumption. Then, an optimal control problem is formulated to find the globally optimal energy management strategy of FCHEV over driving cycles with road elevation profile. In order to solve the optimal energy management problem of the FCHEV, Dynamic Programming, a dynamic optimization method, is used, and their results are analyzed to find out how hilly road conditions affect the optimal energy management strategies. The results show that the optimal energy management with a smaller battery tends to actively prepare (e.g. pre-charge/pre-discharge) for uphill/downhill roads in order not to violate the battery state of charge (SoC) bounds. On the other hand, when the battery is large enough to handle a deep SoC swing due to hilly road profile, the optimal energy management strategy is not significantly affected by various battery sizes. In conclusion, when an energy management strategy is designed for FCHEV, the designer needs to utilize the road altitude information in order to achieve near-optimal fuel economy with charge-sustenance.