Solid-state fermentation (SSF) is the bioprocess where microorganisms are cultivated in the absence of free water under control conditions. Lactic acid can be produced by fermenting grape stalks with Rhizopus oryzae in SSF. During the microorganism growth, the temperature and water content of the solid bed fluctuate, leading to areas of either dry or excessive moisture in the solid substrate. Therefore, it's crucial to control the supply of water to the matrix. In this work, we obtain lactic acid through SSF of grape stalks using Rhizopus oryzae NCIM 1299. The SSF was conducted at a fixed temperature of 35 °C, with three constant relative humidity levels: 50, 65, and 80 %RH. Mathematical models, including the Logistic and First Order Plus Dead Time models for fungal biomass growth and the Luedeking and Piret with Delay Time model for lactic acid production, were adjusted to kinetic curves. Growth kinetic parameters (Xmax, μmax, Tp, T0, Yp/x and td) were determined for all conditions. These kinetic parameters were then correlated with relative humidity using a second-degree polynomial relationship. We observed a decrease in Xmax with increasing %RH, while the value of Yp/x increased at higher %RH. Finally, the optimal variable relative humidity profile was obtained by applying the Dynamic Optimization Technique, resulting in a 15.30% increase in lactic acid production.