One of the major tasks in developing bipedal walking robots is to improve energy efficiency of their locomotion. In this paper a method for extending this research by considering ground inclinations is introduced. The investigated robot is driven by electric motors in its revolute joints. Robot's gaits for different walking speeds are generated via numerical optimization, minimizing energy consumption during locomotion. Energy efficiency can be increased for differently inclined grounds where the robot utilizes its natural dynamics and gravity.