The idiomatic relationship between out like a light and falling asleep (or being rendered comatose) quickly is easily understood in the context of electric lights extinguished instantly by a switch. The logic would also seem to apply to the blowing out of a candle, the turning down of the wick of an oil lamp, or the closing of a gas jet.
But when and where did the application of the phrase to mean this first take shape?
In searching via ngram, 19th century usage shows up, but most of those references that refer to dimming or extinguishing seem to be focused on fleeting emotions and facial expressions rather than consciousness. Numerous mid 20th century references (at least as early as the 30s) use the phrase in the modern sense.
Does anyone have information as to when and where out like a like started to mean rapid unconsciousness?