I think everything that Sherlock does in this scene with regards to John is for John’s immediate safety. In the long term, too, but at that moment, Mary is armed, dangerous and backed into a corner, they cannot afford to have John antagonise her. There’s a possibility that Mary’s mission protocol after being caught is to terminate them both and flee.
I think that, with this in mind, we could see Sherlock speaking to Mrs Hudson as he walks through the door as an attempt to immediately get rid of her, for her own safety. If Mary were to suddenly abort the mission and shoot John and Sherlock in the head, Mrs Hudson would also be a target because she would be a witness. I don’t think Mary would want to leave any loose ends if this were the case.
So, when they come home and Mrs Hudson happens to be there in the flat, Sherlock immediately tells her to leave, specifically to go to her kitchen. Sherlock knows about Mrs Hudson’s drug habits: the line, ‘isn’t it time for your evening soother?’, is, after all, from ASiP, the first episode,
Bonus: Sherlock says this to get rid of her. This line means, ‘Isn’t it time for you to go?’. Here a reference to Mrs Hudson going to get drugs means, ‘get out of here, immediately!’. Also, note the similarity in his facial expression as he says, ‘what exactly in the point of you?’, in HLV and here, in ASiP, as he encourages her to leave his flat.
Mrs Hudson’s specific drug habits are reinforced via Magnussen’s earlier assesment: Marijuana and alcohol,
This is a reminder to the audience about Mrs Hudson’s backstory: it does not include using morphine. In fact, that’s one of Sherlock’s pressure points according to Magnussen (upon seeing his behaviour when they meet at the restaurant) but not one of Mrs Hudson’s.
Later at the Baker Street Confrontation, Mrs Hudson reminds us that it was not she who was the drug dealer, it was her husband,
Sherlock brings up her past as an exotic dancer, reinforcing the idea that Sherlock knows a version of the facts that Magnussen showed us earlier,
Again, no references to morphine in sight.
Sherlock must know that Mrs Hudson does not have morphine in her kitchen or anywhere else in her flat and yet he asks her to fetch him some. I think this is Sherlock’s veiled attempt at getting her to safety. In this scene I think he’s trying very painfully to get John to understand that they’re in grave danger. He can’t come right out and say it precisely because they are in great danger. He tries to redirect John’s anger at himself even as he tries to give John hints of how much danger they’re really in.
I think it’s worth noting that Sherlock avoids eye contact with Mrs Hudson as he requests morphine from her and immediately after as he yells at her. I think that when Sherlock lies he often fails to make eye contact and I think here he’s hoping that she’ll just go away and be offended enough not to come back. We see how he protected her in ASiB, I don’t think he’s doing things any differently in this situation: he’s just doing it covertly.
One of the worst feelings ever about opiate use, other than withdrawal, is the feeling of the drugs leaving your system and your body sobering up. Its like you’re leaving heaven and returning back to hell.
Ad for Cube Morphine, published in American Druggist and Pharmaceutical Record, 1900.
By 1900, use of narcotics was at its peak for both medical and non-medical purposes. Advertisements promoting opium- and cocaine-laden drugs saturated the newspapers; morphine seemed more easily obtainable than alcohol. New York Academy of Medicine