A more usual method is to have the non-profits contract with a for-profit "management consulting firm" that does the running of the real things. Nonprofit can take in money, pay the for-profit for providing the thing the donation was earmarked for; all legal and fine. The same people can be employed by both companies.
Any profits the "for profit" arm makes can then be donated back to the non-profits for financial advantage in holding the money, if any. Lather, rinse, repeat.
Any profits the "for profit" arm makes can then be donated back to the non-profits for financial advantage in holding the money, if any. Lather, rinse, repeat.