The work aims to realize energy-efficient bipedal walking by employing the three-mass inverted pendulum model (3MIPM) and compare its energy performance with linear inverted pendulum model (LIPM). To do this, a general optimal index on center of mass (CoM) acceleration is first derived for energetic cost evaluation. After defining the equivalent zero moment point (ZMP) motion, an unconstrained optimization approach for CoM generation is extended for 3MIPM, which can track different ZMP references and address the height variation as well. To make use of the allowable ZMP movement, a constrained optimization method is also employed, contributing to lower energetic cost. Simulation and hardware experiments on a humanoid robot demonstrate that the 3MIPM could achieve higher energy efficiency.