(CNN) -- It is said that in the final, frenzied months of her life, Sylvia Plath continued to maintain her daily routine of writing four to six hours a day -- completing her poetry collection "Ariel."
A new study may help explain how Plath was able to continue writing so regularly and prolifically, despite being wracked by anxiety, depression and insomnia.
In a word: habit.
Many of us assume that people are more likely to engage in destructive behaviors -- diving off the deep end of a pint of Chunky Monkey, or sitting frozen before the altar of the "Real Housewives of Wherever" for marathon stretches -- when they are stressed and overwhelmed. But that's not necessarily true, say scientists Wendy Wood and David Neal.
"It's obvious that when you lack willpower, you are more likely to engage in bad habits," says Neal, "but no one had really looked at what happens to our good habits."
The answer, they found, is that exactly the same thing happens to good habits that happens to bad ones: You are more likely to revert to them.
Across a series of five experiments, Neal and Wood showed that when people are stressed out and tired, they return to their fundamental routines -- whether those are good or bad.
In one study, the researchers found that students undergoing exams increased their performance of both desirable and undesirable habits. That is, those students who regularly ate healthy foods for breakfast were more likely to do so during exam time. And students used to eating an unhealthy breakfast -- pastries, pancakes and French toast -- were similarly inclined.
The scientists also found that students in the habit of reading an educational section of the newspaper were more likely to continue reading the paper during their exam weeks, as were those students who read entertaining and less educational sections of the paper.
This pattern was especially noteworthy because the increase in "habitual reading emerged despite the greater time demands that students experience during exam weeks," wrote the researchers.
A well-established body of research tells us that willpower is a finite resource. In the face of multiple stressful stimuli, our willpower wears out and it takes time -- and sometimes sleep -- to recover.
Say you're having a conversation with your mother-in-law, Neal explained, and you're stifling some things you really want to say: That's one form of willpower. And if at the same time you're sitting near a plate of fresh, hot chocolate chip cookies and trying to prevent yourself from overindulging, that represents another form of willpower.
Though they are very different types of self-regulation, both draw from the same well, making it more challenging for you to control either action.
Thankfully, in Neal's scenario, it doesn't necessarily follow that you will tell off your mother-in-law and stuff your face with cookies.
When you lack willpower, you avoid anything new and fall back on what you already know. In other words, you revert to your default settings. And most of us have more good default habits than bad.
"I think many people will be surprised by our findings," Wood wrote in an e-mail, "because they associate habits with unwanted behaviors." But the mechanism behind automatically reverting to bad, unwanted habits is the same as that behind good, desired habits.
"We just tend to focus on our bad habits because they are such a challenge," she observed. "We don't realize that many of our daily habits are actually beneficial and help us to meet goals."
But what if you're not one of those lucky people with a history of solid habits? What if, in fact, your habits are downright horrid?
"If you've grown up with bad habits or formed them later in life, yes, the phenomenon is that it's a net negative for you," observes Neal. "If a majority of your routines are unhealthy, then lacking willpower is really a problem. It becomes a double whammy because you are forced more into those patterns."
But tough as it may seem, it is possible to shift bad habits.
There are two separate issues here, says Neal: the first is breaking the bad habit and the other is establishing a new habit in its place.
Wood and Neal's earlier experiments offer a number of simple techniques that may help:
Change the environment. Many of our bad habits are context-cued. By changing our environment, we can remove the cues that may be problematic.
If the visual trigger is not present, we may not, for example, unconsciously reach for unhealthy foods.
"There is an out-of-sight, out-of-mind element here," observes Neal.
Plan ahead. Since the unconscious mind is extremely cue-driven, we can use the conscious mind to stack the deck in our favor. Keeping healthy snacks in the car or at your desk, for example, may encourage you to grab those when you're hungry.
Disrupt established patterns. Changing the sequence of actions in a daily habit can change the habit. One of Neal's older studies showed that this can be as simple as switching the hand with which you eat from the dominant hand to the nondominant one.