First, you need to consider what are the "parameters" of this "optimization algorithm" that you want to "optimize". Let's take the most simple case, a SGD without momentum. The update rule for this optimizer is:
$$
w_{t+1} \leftarrow w_{t} - a \cdot \nabla_{w_{t}} J(w_t) = w_{t} - a \cdot g_t
$$
where $w_t$ are the weights at iteration $t$, $J$ is the cost function, $g_t = \nabla_{w_{t}} J(w_t)$ are the gradients of the cost function w.r.t $w_t$ and $a$ is the learning rate.
An optimization algorithm accepts as its input the weights and their gradients and returns the update. So we could write the above equation as:
$$
w_{t+1} \leftarrow w_{t} - SGD(w_t, g_t)
$$
The same is true for all optimization algorithms (e.g. Adam, RMSprop, etc.). Now our initial question was what are the parameters of the optimizer, which we want to optimize. In the simple case of the SGD, the sole parameter of the optimizer is the learning rate.
The question that arises at this point is can we optimize the learning rate of the optimizer during training? Or more practically, can we compute this derivative?
$$
\frac{\partial J(w_t)}{\partial a}
$$
This idea was explored in this paper, where they coin this technique "hypergradient descent". I suggest you take a look.