I had a combination of head canon mingled with personal experience.
Drug interactions. :) And Baskerville. Season 2 discussion/spoilers!
Remember how Henry Knight gets after John has left him? John tells Sherlock that he's had to give Henry something -- indeed, John tells Henry, "I'm giving you something to help you sleep."
But Henry's been drugged already. Which John doesn't know. So John has no reason to worry about drug interactions.
That could very likely explain why Henry wakes up, why he freaks out so badly.
Every time I've watched it, I thought that somehow Henry was being drugged again. That there was something planted in his house, something making everything worse. Something that maybe we aren't able to perceive because Henry can't.
Remember, we're seeing it through Henry's eyes; Henry is hallucinating; therefore, we can't quite trust what Henry thinks he's seeing. (Not that Henry can either, but the poor dear doesn't know that.) So he's positive he's going crazy.
It could be that there IS something else there. But Henry's already been drugged twice that night. It's very probable that the sedative John gave Henry simply reacted -- badly -- with the hallucinogen.
Sedatives don't always work for every person the same way. Sometimes they simply stop working entirely. Sometimes they work -- but just for a little while. There is a reason drug manufacturers have to give you long lists of What Could Go Wrong.
Some of those things do go wrong.
Baskerville is probably not what they normally have in mind, however. 8D
Final thoughts: If John had really considered, he would have got Henry up to bed in his own room. The safety and familiarity of where he normally sleeps.
Sleeping on a couch, right by a glass wall, on the ground floor--!
That was pretty much deliberately inciting someone to come along and scare Henry... just like what happens with the outside lights! And who DID run up to the window? Didn't someone? I don't think that was all hallucinating. Awfully convenient, wasn't it?
Even for a story that was the series haunted-house ep.