The idiom PUT A SOCK IN IT – generally means to keep quiet.
The origin of this saying goes back to the old days when sound reproduction instruments, like the gramophone, had no volume control.
Often times the sound was so loud that it was unbearable. Therefore, people literally put a sock into the place where the noise came from to reduce the volume.