No, it doesn't work every time. I've tried it many times and only had a few lucid dreams, but on the other side of that coin I've never had one without using some form of that method. It's really a shot in the dark but the idea behind it (from my perspective) is that if I can implant the idea of being lucid into my mind right before I go to sleep I can carry it over unconsciously and be more aware of dream signs and such, and more likely to actually realize that I'm dreaming, like what KingYoshi said.

For example if I'm thinking or meditating on the fact that I'm about to be asleep and that it's possible for me to become lucid, I feel like I'm more likely to stop in the dream and ask myself why I'm here, how I got here, how I know this character, why that car looks kinda funny, etc instead of just accepting it. I try to let it be the last conscious thought in my mind before I drift off. Kinda like if you're thinking of your new girlfriend (or whatever) as you go to sleep, you might be more likely to dream about her.