OK, I have seen it again but I still have he transcript open, because the second time I got carried away again and just flew with the episode rather than memorizing useful bits of dialogue and apparently I can't do both at once.
Mycroft does say Sherlock was high before he got on the plane (and John doesn't think he seemed high, but Mycroft is convinced he was). Mycroft probably has more experience with Sherlock's complicated relationship with drugs, and he is more observant / better at deducing from details than John.
Assuming that the apparent hacking of England in Moriarty's name is not a ploy by Mycroft to have a good excuse to get Sherlock a pardon, Sherlock genuinely didn't know about the crisis when boarding the plane (or when he took the drugs). Now the drugs were apparently some infernal concoction if there is a list and it is implied that cocaine was on the list and perhaps the crucial item on it, but he didn't take them in order to solve this case. They helped him think about the case (and apparently some other things while he was at it) but the reason for taking them was different.
Sherlock implies he took them because he needed a distraction ("No need for that now. Got the real thing. I have work to do") which is like the line about cigarettes in THoB, but distraction needn't be from boredom; it could be from unhappiness.
Anyway, what he actually does -- tries to solve the current crisis by solving another case, long cold, while apparently analysing to bits his obsession with Jim, Jim's obsession with him, some things about Mary and some about John -- is suspiciously complex, multi-layered and narrative.
Mycroft does note that this is not how a mind palace works, that a mind palace is for data storage, not for immersable stories with drama etc. That will be beause Mycroft is oversimplifying for John, and because he is not a drug user.
Mind palace-like memory techniques wee not invented for Sherlock; they are real and really work although they require a lot of effort; well tanstaafl. They are for example nicely depicted in John Crowley's Little, Big, which also points out how they can be used to discover (seemingly) new information: it's possible to know things without knowing that you know them and a well-apointed mind palace can surprise you with access to such lost knowledge and so boost your thinking (even though it won't make you any more clever). That way of using a memory building actually is a little bit narrative but nowhere near as elaborate as what Sherlock does here. He is unique, I know, but this is the first time we see him spin a story so complex; he doesn't seem like a fiction person at all. And both Sherlock and Jim mention going deep, or deeper, into himself, apparently by means of that drug cocktail.
So I think his sober mind palace is more mundane, more like a spatial database or what we saw in THoB. The closest we see to that not-quite lucid dream of TAB is in TSiB when he solves the hjker's case with a dreamed-up version of Irene and he is drugged then too. With something very different probably, ketamine or something but that can make you hallucinate too.
Now TSoT. When he originally tackled the case of the Mayfly Man, he talked to all those women via chat. Is the courtroom scene how he saw it then, or only how he thought about it looking back, telling the story at the wedding? I assumed the latter but perhaps both? The rest of the courtroom scene, however, the part after the wineglass breaks, is clearly his mind during the wedding. And while not as colourful as TAB, the courtroom scene is imilarly detailed to that deduction with Irene and like TAB it seems to solve a few things on a few levels simultaneously: the Mayfly Man of the past, the current threat at the wedding, some things in the background about himself and John and marriages. All that looks suspiciously like Sherlock's problem solving mind after he took something. Not much; he obviously thinks he can control it, so he probably often can.
The argument that he wouldn't do that to John, and at John's wedding, is much more convincing to me than what his pupils looked like, but not decisive because I'm afraid that he would seriously think that if John never finds out, then no harm done. What he does before the HLV / TAB plane is like that, after all. And he thinks he is in control. And perhaps when he takes cocaine it really is only a seven percent solution, although intravenously? That part makes it hard to compare with what people actually do that I know of.