For sure.
I'm far from rich, but I'm comfortable enough that I can afford to stop caring about my employer's bottom line at quitting time.
I nevertheless spend a lot of my free time coding, and enjoying the freedom of not having to worry about anything I make being profitable. (If you've never written a big complex project alone for your own enjoyment rather than for someone else / as a resume padder, I highly recommend it. It's freeing to write code that you wouldn't want to put on a resume and couldn't sell.)