As a part-time freelancer who also has a full-time job, I often don't have a choice but to code late at night or early morning.
I honestly hate working at night, simply because I often miss small things that cause silent bugs. On the other hand, coding at early morning (5-6 am, before my wife and kid are up) feels really great.