This paper addresses the problem of optimal predefined-time stability. Predefined-time stable systems are a class of fixed-time stable dynamical systems for which a bound of the settling-time function can be defined a priori as an explicit parameter of the system. Sufficient conditions for a controller to solve the optimal predefined-time stabilization problem for a given nonlinear system are provided. Furthermore, for nonlinear affine systems and a specific performance index, a family of inverse optimal predefined-time stabilizing controllers is derived. This class of controllers is applied to the inverse predefined-time optimization of the sliding manifold reaching phase in linear systems, jointly with the idea of integral sliding mode control to ensure robustness. Finally, as a study case, the developed methods are applied to an uncertain satellite system, and numerical simulations are carried out to show their behavior.