The motion of an ultrarelativistic perfect fluid in space-time with Kasner metrics is investigated by the Hamiltonian method. It is found that in the limit of small times a tendency takes place toward the formation of strong inhomogeneities in matter distribution. In the case of slow flows the effect of nonstationary anisotropy on the dynamics of sound waves and the behavior of frozen-in vortices is considered. It is shown that the hydrodynamics of slow vortices on the static homogeneous background is equivalent to the usual Eulerian incompressible hydrodynamics, but in the presence of an external nonstationary strain velocity field.