Nothing wrong with developing your own product on the side or "after hours", although be aware that at many startups most positions have some kind of operational component and/or tight deadlines, which might interfere with after hours projects. (Not all startups/small companies are like this of course).
Make sure that if you are developing something on your own time that it does not compete with the company's product line, you will often have to sign a contract to that effect. Along the same lines, be sure to have a clear line between things you develop for the company and things you develop for yourself - keep a separate machine for your own code, don't use your employer's equipment or even a personal machine with your employer's code checked out on it. The same advice goes for freelance projects.