Private-equity firms are finding that their best friends these days are other private-equity firms.

Buyout shops struggling with slumping demand for initial public offerings are instead selling their portfolio companies to rivals at a pace not seen since 2006. The trend reflects rough times for the industry — and risks upsetting their investors.