Rumor is that he's been on a stimulants / sleep aids cycle working ludicrous hours. You can only sustain that for so long before your brain throws a rod and starts banging and chugging and emitting a lot of smoke.
There are tweets in support of this, like him talking about Ambien.
https://www.cnet.com/news/elon-musks-strange-strange-ambien-...
Ambien is known to produce some weird states of mind. I used it briefly and can attest to this, though I never got a visit from the walrus:
https://ambien.blogspot.com/2010/12/ambien-walrus-collection...
I admire Elon a lot, and I hope he takes a break and gets his head sorted. When I first heard about the tweets causing the SEC to sue I speculated to my wife that his subconscious mind had engineered this event to force him to take a break as some kind of mental self-preservation circuit breaker.