It's worth noting that, on an operational level, both companies already operate without him. Given his incessant tweeting and his political shenanigans, he can't have much time left for running either company.
I suspect that, at SpaceX, he is responsible only for setting ridiculous deadlines and then shouting at people who fail to make them. He probably also helps with the fund raising. Without Musk, SpaceX will have to cut back on all the cutting edge stuff that is losing them money, like Starship and possibly Starlink or they will go broke without all the continuous investment that Musk brings in.
I suspect that, at Tesla, he is responsible only for stupid ideas, setting ridiculous deadlines and then shouting at people who fail to make them. He also helps prop up the share price. Without Musk, Tesla's share price would take a massive hit as people realise it is just a car company, and one with significant challenges ahead. There will be a spike in sales as people who would never buy anything off Musk change their minds about buying a Tesla. If it survives long enough, Tesla will become a solid mid sized car company with some higher end products. However, I think it is more likely to get bought by one of the larger car companies.