If you often have trouble getting to sleep because you can’t seem to shake the worries of the day, a Canadian researcher may have a solution.

Luc Beaudoin, an adjunct professor in cognitive science and education from Simon Fraser University, says the key to battling insomnia is something he calls the "cognitive shuffle."

The shuffle is a technique one does in bed, while trying to drift off. All it involves is picturing random mental images to distract your mind and set the stage for sleep.

“The idea is to imagine one thing after another,” Beaudoin told CTV News Channel Monday from Vancouver.

Beaudoin says it’s surprisingly hard to simply think of random things, he likes to start with a main word, such as ‘bedtime.’ Then you begin picturing things that starts with the first letter of that word, such as a bed, a baby, a banana, a can of beans.

“When you can’t think of anything else, you move on to the second letter in the word, ‘e,” he said. “…And you go on like this until you get knocked out.”

While picturing bananas and beans might sound an awful lot like picturing sheep jumping over a fence, Beaudoin says counting sheep isn’t really that effective because it’s too boring to imagine the same image over and over. And when our minds are bored, they tend to wander back to our worries, which are more interesting, thereby bringing us back to square one.

The technique of picturing images strung together in a random way, Beaudoin says, mimics the way our minds work as we drift into sleep.

Beaudoin recently presented research about his technique -- formally entitled “Serial Diverse Imagining” -- to a joint meeting of the American Academy of Sleep Medicine and the Sleep Research Society. His study found SDI to be as effective as other known sleep techniques in reducing pre-sleep arousal and allowing for more restful sleep.

Beaudoin says the technique works because it both distracts the mind and mimics our brain’s own ways of falling asleep.

“The whole thing came out of a hunch about what happens when we naturally fall asleep. Our minds drift and wander. So one reason it might work is it imitates the kind of thinking you do when you are falling asleep,” he said.

“Another reason this might work is that, while you’re doing this technique, you’re not thinking of the things that might keep you awake,” he said. “…You can’t think about your mortgage, your kids or your marriage or whatever’s causing you problems or concern because you’re doing this technique.”

Because it’s often difficult for people to conjure up random images, Beaudoin has also created an app called mySleepButton, in which a narrator offers suggested images or scenes for the user to imagine.