It = the whole situation = when- 形式宾语, 代替整个句子.
我讨厌他们在吃饭的时候说话。it就指代后面的when they say with their mouths full of food.作形式宾语
it 形式宾语,,when they say with their mouths full of food” 真正的宾语
是做的宾语,因为when引导宾语从句