In this paper we consider the stability of a class of deterministic and stochastic SEIRS epidemic models with delay. Indeed, we assume that the transmission rate could be stochastic and the presence of a latency period of r consecutive days, where r is a fixed positive integer, in the "exposed" individuals class E. Studying the eigenvalues of the linearized system, we obtain conditions for the stability of the free disease equilibrium, in both the cases of the deterministic model with and without delay. In this latter case, we also get conditions for the stability of the coexistence equilibrium. In the stochastic case we are able to derive a concentration result for the random fluctuations and then, using the Lyapunov method, that under suitable assumptions the free disease equilibrium is still stable.