For models of gravitational waves in the Bianchi type IV universe, an exact solution of geodesic deviation equations is obtained. The spacetime models under consideration refer to the Shapovalov wave spaces of type III and type N according to Petrov's classification. The form of test particle trajectories, the geodesic deviation vector, and tidal acceleration in a gravitational wave are found. The results are presented both in the privileged coordinate system and in the laboratory synchronous coordinate system, where the freely falling observer is at rest. The resulting exact models describe primordial gravitational waves. The presented approach can be applied both to Einstein's classical theory of gravity and to modified theories of gravity.