The President wouldn't be in breach of Insider Trading Laws (Section 10b of the Securities Exchange Act) since he has no information resulting from a position of trust within Twitter (or as a trusted provider of services) and no ability to depress their stocks through intentionally fraudulent practices.
[O]ne who fails to disclose material information prior to the
consummation of a transaction commits fraud only when he is under a
duty to do so. And the duty to disclose arises when one party has
information “that the other [party] is entitled to know because of a
fiduciary or other similar relation of trust and confidence between
The key word here is "insider". The President is not an insider, he's merely the user of a service. He certainly has material information, but not gleaned from a position of confidence or trust.
anyone in possession of material inside information must either
disclose it to the investing public, or, if he is disabled from
disclosing it in order to protect a corporate confidence, or he
chooses not to do so, must abstain from trading in or recommending the
securities concerned while such inside information remains
That being said, it's arguable (and I'm reasonably sure his political opponents would argue it until the cows come home) that his shorting their shares would be a material violation of the STOCK Act, specifically section 6 which requires the President to have disclosed his holdings of shorted stock to the public.
It's also pretty arguable that his popularity on Twitter is a direct result of his office as President, and hence making money by publicly and messily leaving their service will result in a breach of accepted ethical standards and potential impeachment even if no specific law has been broken.