Actually, he can't.
The mystique of his companies is that Elon Musk alone is capable of driving the value. People used to think he could walk on water, and despite his own self-inflicted harm to his personal brand with his ill advised foray into politics, they still think he can drive success. The entire value of his shares is based heavily on him being CEO. If he were to walk away, they would tank.
On top of that, as major insider, the SEC would not allow him to sell his shares without notifying the markets of his intention to do so weeks in advance. That gives the markets time to react not just to his departure, but him dumping his shares would dramatically increase the supply of those shares at the same time as lowering the perceived value of those companies with his intended departure. The stock price would crater before he could liquidate them, so he wouldn't end up with nearly the amount of cash with this.
On top of all of that, and this is in the filings, roughly 90% of his stock which is tied up in this trillion dollar valuation is restricted or unvested, based on hitting certain performance objectives. If he walked away tomorrow, roughly 90% of his stock, which is illiquid, he'd forfeit back to the company as they haven't vested yet. For example, much of his SpaceX stock is tied to:
1) Mars colonization - the establishment of a permanent human settlement on Mars with 1 million inhabitants
2) Space compute - the operation of non-Earth based data centeres providing at least 100 terawatts of annual compute capacity
3) Market Capitalization - that SpaceX reaches a series of corporate value milestones (there are 15 total, some vest at each tranche). the first corporate valuation goal is $7.5 trillion, and they all go up from there.
So it's also a bit of a misnomer for him to be "worth $1 trillion" when 90% of it is tied to goals that are unachievable like a 1 million-inhabitant colony on Mars or building 100 terawatts of computing power in space when it's not clear if the AI market even needs that and that Grok's services are lagging behind Anthropic and OpenAI (hence why he is leasing his data center capacity to Anthropic, Grok's usage is too low and he needs to pay for that infrastructure). What is notable though is that while they have not vested, Musk does have voting rights for those shares.
Now do you see the game he's playing? He can vote on the company objectives with his Class B shares, which similar to Zuckerberg's shares have 10 votes for every 1 of normal shares. So despite not directly owning those shares and they may not vest at all, it gives Musk 82-85% of the shares' voting power to nominate Board members and control the company. Even if he fails to achieve those, he effectively controls it no matter what, which is what this is all about. The broader question though is will the public markets take him at his word. The public markets are much more brutal about what CEOs say, and he runs his mouth in ways that already got him in trouble once with the SEC. Given the size of SpaceX now, he's a significant part of the major indices; the SEC will crack on him even harder if his drug fueled X-posting moves the stock in the wrong way and affects the broader market indices.