This paper proposes a dimension reduction technique for estimation in linear mixed models. Specifically, we show that in a linear mixed model, the maximum-likelihood (ML) problem can be rewritten as a substantially simpler optimization problem which presents at least two main advantages: the number of variables in the simplified problem is lower and the search domain of the simplified problem is a compact set. Whereas the former advantage reduces the computational burden, the latter permits the use of stochastic optimization methods well qualified for closed bounded domains. The developed dimension reduction technique makes the computation of ML estimates, for fixed effects and variance components, feasible with large computational savings. Computational experience is reported here with the results evidencing an overall good performance of the proposed technique.