Want to be a better worker? Get a creative hobby

Doing this can make you a better worker

Here's a reason to embrace your inner guitar player or secret poetry writing habit: It may be making you better at your day job.

Employees who did something creative after work—like knitting, drawing or even playing a video game that required creative thinking—were more likely to be helpful and creative problem solvers on the job, according to new research from San Francisco State University.

That was true even after researchers controlled for people who are naturally more creative personalities, said Kevin Eschleman, an assistant professor of psychology at the school and one of the report's authors.

Read MoreSome Amazon employees may get $5,000-to quit

The creative after-work activities also can be valuable even if you don't totally disengage from work during that time, Eschleman said. In other words, you can check your work email occasionally while drawing sketches after hours and still be a more creative problem solver in the office the next day.

Separate research has shown that workers can be happier—and potentially perform better at work—if they take a break from work email and other office distractions after hours. But Eschleman said that wasn't the focus of this research.

Read MoreStay-at-home moms growing among young and poor

Betsie Van Der Meer | Taxi | Getty Images

Eschleman—whose own creative pursuits often involve cooking and baking—said it can even be helpful to use the time you are pursuing something creative to think through work problems. For example, writing a short story may be a way to work through the frustrations of work.

The findings also suggest that companies might benefit from encouraging their workers to get creative. That could mean displaying employee art projects on the walls, hosting a baking contest or even negotiating a discount for employees who want to use the local pottery studio.

But Eschleman cautioned that employers need to make sure that staffers don't feel forced into painting a mural or writing a poem.

Read MoreTalk is cheap-unless it gets you a raise

Also, if your job really isn't that great, it probably won't help that much to take up knitting after hours. Eschleman said the first thing people who are unhappy at work should probably consider is how they can get more out of their jobs.

"Creative activities aren't going to solve everything, but it could be something that helps," he said.

—By CNBC's Allison Linn.