I'm looking into starting a hackathon to stimulate creativity at the company and solve real problems (not startup but small with 30 people). Some questions: Should it be after work hours? How do you frame a theme or propose problems to be solved? How do you make sure that people don't go too far away and build stuff that is not useful?
The best ones are done over the weekend. My favorite schedule for it is from Saturday morning until Sunday noon.
You could make it a competition for people to build something to solve something specific. They have the liberty to do whatever tool they think best to solve that problem.
Also, make sure the prize is useful for them.