Plastic relaxation of internal stresses in a dislocation microstructure