Go ahead and have that extra cup of java– it might just help you act ethically at work.

Caffeine could help sleep-deprived workers resist unethical influence from higher-ups, according to research by business professors at the University of Washington, the University of Arizona and the University of North Carolina.

Lack of sleep can lead to unethical behavior in the workplace, they have found, but the equivalent of a large cup of coffee can help sleep-deprived employees bolster their ability to control their behavior and resist unethical temptations, according to their new study published in the Journal of Applied Psychology.

“When you’re sleep deprived at work, it’s much easier to simply go along with unethical suggestions from your boss because resistance takes effort and you’re already worn down,” said David Welsh, an organizational behavior professor at the University of Washington. “However, we found that caffeine can give sleep-deprived individuals the extra energy needed to resist unethical behavior.”

“Our research shows that sleep deprivation contributes to unethical behavior at work by making you more susceptible to social influences, such as a boss who tells you to do something deceptive or unethical,” said Michael Christian, an organizational behavior professor at UNC Kenan-Flagler Business School. “Caffeine can help you resist by strengthening your self-control and willpower when you’re exhausted.”

Christian, Welsh and co-authors Aleksander P. J. Ellis and Ke Michael Mai of the Eller College of Management at the University of Arizona published their findings in the article “Building a Self-Regulatory Model of Sleep Deprivation and Deception: The Role of Caffeine and Social Influence.”

They built on Christian’s and Ellis’s earlier research which shows that the lack of sleep depletes a person’s ability to regulate thoughts emotions, and behaviors and increases unethical acts.

“Employers need to be recognize that today’s employees are working longer hours and getting less sleep,” said Welsh. “Establishing an ethical code of conduct might not be sufficient if employees are too worn down to align their behavior with organizational standards.”

What might businesses do to help tired workers avoid these ethical lapses? The researchers suggests that firms could:

Provide caffeine in the workplace

Reduce long hours with scheduling, overtime restrictions and frequent breaks

Avoid scheduling tasks that require a great deal of self-control when looming deadlines make long hours unavoidable

Provide workplace napping and sleep awareness training

“We need to develop awareness about the negative effects of sleep deprivation,” Christian said. “Cultures can reinforce the myth that working hard and working well involves not sleeping, but our research shows yet again that sleep deprivation isn’t good for the individual or the organization.”