It is assumed that all of the hearts Sora, Roxas, and Xion set free from KH1-KHII were absorbed into Xemnas' artificial Kingdom Hearts. Once Sora and co. destroyed it, all of the hearts were set free at the same time, resulting in all of the nobodies regaining their existences simultaneously.