In this paper a stability analysis of microperiodic beams resting on the periodic inhomogeneous foundation is carried out. The main issue of this considerations, which is the analytical solution to the governing equations characterised by periodic, highly oscillating and non-continuous coefficients, is overwhelmed by the application of the tolerance averaging technique. As a result of such application, the governing equation is transformed into a form with constant coefficients which can be solved using well-known mathematical methods. In several calculation examples, the convergence of the results of two derived averaged models is examined, as well as the convergence of the lowest value of the critical force parameter derived from the averaged models with the FEM model. The results prove the superiority of the presented analytical solution over the FEM analysis in the optimisation process.