This paper considers inverse optimal control design for an inverted pendulum with three-dimensional movements. We show that the inverted pendulum model can be transformed into the bilinear system via a quadratic approximation and coordinate/input transformations. Then, the inverse optimal controller proposed in one of our previous works is applied to the resulting bilinear system. We next show that the present scheme has a better performance than traditional linear optimal control for linearly approximated systems by effectively utilizing the vertical movement of the pendulum system. This result is confirmed by conducting numerical simulations.