1. Tell someone you own a security
2. They get excited and buy it
3. You sell it when it goes up
You can't just classify this set of actions as a pump and dump. You have to do something that is considered a scam, such as grossly misrepresenting the security with the intention of making a profit at the cost of uneducated investors. As far as I can tell, Elon never claimed Bitcoin is environmentally friendly, nor did he make other false claims about Bitcoin's functionalities or capabilities.
Pump and dump arguably isn't immoral. It's just using herd mentality, if it wasn't illegal people might actually try to think before they buy and sell.
I don't even have to point to any specific laws, just look at all the websites that talk about stocks operating without any SEC intervention.