The reason this tweet is (probably) legal is that (a) it doesn't financially benefit Musk and (b) if he actually is considering this then it doesn't "artificially" affect the price. Even deliberate stock manipulation can be legal if not done for profit: https://en.wikipedia.org/wiki/Sarah_Meyohas#Stock_Performanc....
Musk's entire compensation package is tied directly to stock performance targets in the form of market value. Saying that the stock price does not financially impact (positive or negative) Musk is flat out incorrect.