It happens to all of us: we suddenly and inexplicably feel cheery or blue, even though our mood was quite different just moments before. Often the culprit is a subliminal cue, or, as psychologists call it, priming. But we do not have to be at the mercy of these unconscious cues. Recent research suggests that simply recognizing the phenomenon can help us take control.

Researchers usually test the effects of priming by making participants believe they are taking part in a study of some other variable. In a University of Toronto study last year, people who were unconsciously exposed to images of fast-food logos became more impatient and less likely to be thrifty. In another study, published in the March issue of the Journal of Psychosomatic Research, when participants recalled an illness-related memory, their pain tolerance decreased.

A study from the October 2010 issue of Social Cognition revealed how nonconscious goals—those of which we are not aware—can put us in positive or negative “mystery moods.”

A nonconscious goal might be one that has become so automatic you do not even realize you are still pursuing it, such as impressing the boss or taking fewer Facebook breaks. In the study some participants were unknowingly primed toward goal pursuit with a reading task that included words such as “success” and “achieve.” When they failed at a subsequent puzzle, their mood was more negative than those who were not primed with goal-oriented words.

The key to outmaneuvering priming might simply be more self-awareness. Case in point: study participants’ moods lifted when re­searchers pointed out why they had become blue. So if you suddenly find yourself in a funk, think about what you saw, heard and thought about in the past few minutes—sometimes simply identifying the trigger can help you move past it.