We present a compliance adaptation method for online natural dynamics modification of multi-joint robots performing cyclic tasks. In this method, parameters of multi-basis nonlinear compliances, acting in parallel with actuators, are adapted to minimize actuation forces which results in joint-byjoint energy consumption reduction. Stability, convergence, and optimality of this method are proved analytically for a general compliance structure. We do not impose any specific constraint on the controller structure and tracking performance, yet stable tracking of cyclic motions is necessary for the convergence to the optimal solution. Extensive simulations on a set of systems, ranging from simple mass-spring system to robotic manipulator (with linear and nonlinear compliances), along with the experimental results on a 1-DOF compliant revolute joint with two basis functions in the compliance profile, demonstrate the efficiency of our method in terms of stability, convergence, and optimality; i.e., actuation force and energy consumption reduction.