THE kiss you share with the exquisite stranger is electric, deep and seemingly endless — that is until you open an eye and see drool on your pillow.

If only you could have slept long enough to consummate the seduction. Then again, you had no idea you were dreaming. Besides, you cannot control the nightly ride on the wings of your subconscious. Or can you?

Maybe, if you learn to practice “lucid dreaming,” a state in which a sleeping person becomes aware he or she is dreaming and may even be able to direct the action. Those who regularly experience the phenomenon say that like the physics-defying characters in “The Matrix,” they are able to generate or manipulate the fantastical events that unfold. They can fly without wings, play instruments they never learned, go bowling with T. S. Eliot — and, yes, indulge sexual fantasies.

It is likely some people have always had such dreams, said Jayne Gackenbach, a professor of psychology at Grant MacEwan College in Edmonton, Alberta, who conducts research into lucid dreaming. But the esoteric practice, which has been acknowledged in the West since at least 1867, seems on the verge of becoming much better known.