Evolution of random velocities of planetesimals in the course of accretion