The question is faulty, as it's far from certain that the "Sea Peoples" were a cause of the political fragmentation in Egypt and Anatolia at the end of the Bronze Age rather than dispossessed victims of it. It's worth noting that several groups lumped into the Sea Peoples - like the Denyen, Sherden, Lukka, and Eqwesh (Hittite Aḫḫiyawa) - are attested nearly 200 years before the end of the Bronze Age, so they're not recent arrivals in the eastern Mediterranean. Additionally, at least a few of the groups were themselves from the Aegean and Anatolia (the Eqwesh/Achaeans, Lukka, and Peleset/Philistines).
I recommend taking a look at the AskHistorians FAQ for more on the Sea Peoples. I recently discussed their origins in What do we know about the so-called Sea People's origins? and the end of the Bronze Age here and here.