Side projects can be a problem from a patent perspective. Some companies will want rights to anything that you think up during the time of your employ with them, whether it is directly work related or not.
The blue LED was invented by a Japanese engineer (Shuji Nakamura) on his own time, but his company claimed the rights, cue a long court battle. https://en.wikipedia.org/wiki/Shuji_Nakamura