Always keeping your house tidy and spotless may earn you the label of “neat freak”—but “super happy” may be a more accurate tag.

When people voluntarily take on unpleasant tasks such as housework, they tend to be in particularly happy states, according to a new study on hedonism. The finding challenges an old prediction by some researchers that humans can be constant pleasure-seekers. Instead, the new study suggests we might seek out fun, uplifting activities mainly when we’re in bad or down moods. But when we’re on the up, we’re more likely to go for the dull and dreary assignments.

This finding of “flexible hedonism,” reported Monday in The Proceedings of the National Academy of Sciences, may seem counterintuitive because it suggests we sabotage our own high spirits. But it hints at the idea that humans tend to make sensible short-term trade-offs on happiness for long-term gains.

“Although our data cannot directly tell us whether regularly engaging in unpleasant activities predicts psychological and social adjustment five or 10 years down the line, a large body of work has consistently demonstrated the importance of sleeping, employment, and living in a reasonably clean and organized home on mental and physical health,” according to the study authors, led by Maxime Taquet of Harvard and Jordi Quoidbach of the University Pompeu Fabra in Spain.

For the study, the researchers collected mood and activity data on more than 28,000 people who answered periodic surveys on a smartphone app. The app sampled people’s moods and current activities, then checked back a few hours later to probe their subsequent moods and new activities.

The study's data set, collected over 27 days, ended up including more than half a million bits of info. Together, it helped researchers sort activities as either mood boosting or deflating. And it also tracked how people’s moods in turn affected their decisions about what activities to do next.

Unsurprisingly, some activities, such as sleeping and going to a job, were most tightly linked with time and day rather than mood. But others were strongly linked to mood. For instance, if you met a total stranger and wanted to “predict how likely that person is to exercise, chat with friends, or have a drink in the next few hours, knowing her current mood would give you more information than knowing that it is Saturday or that it is 7:00 PM,” the researchers found.

In fact, the researchers found that starting the day in an unhappy mood would make you twice as likely to do a mood-boosting activity, such as going for a walk or playing a sport, than if you woke up in a cheerful mood. And those that start off in a happy mood are 30 percent more likely to spend the afternoon doing things like cleaning their apartment.

The connection between mood and activities stayed firm when researchers looked to see if cycles of moods or activities could explain the data.

“People’s current mood meaningfully changes (sometimes doubling or tripling) the probability they later engage in certain types of activity,” the authors concluded.

The researchers say they need to do more work to parse the connection. For instance, it may be that moods affect energy levels and focus, thus altering a person's interests or abilities to do certain tasks.

But given the new data, the authors speculate that “our personal well-being and survival potential as a species might crucially depend on our ability to overcome the allure of short-term happiness gains to maximize long-term welfare.”

Proceedings of the National Academy of Sciences, 2016. DOI: 10.1073/pnas.1519998113 (About DOIs).