I regularly ride home between the hours of 0000 and 0200.
To be honest I love it, its the best time to ride. I can see the appeal of riding at 4/5am, but ive never been a morning person and getting up at 0530 for the early shift is my idea of hell.
I ride a whole range of routes home varying from the 6 mile direct route to the 14 mile long way around. Some of these routes are semi rural, some through suburbia, roughish estates and some skirt the edge of town.
The estates are usually empty at that time of night and cause no issue, i do worry sometimes about a drunk driver, but I think the changes of being hit by a drunk are probably less than the chances of being hit by the greater number of cars in the day. Most drunk drivers are too busy following the white line so l keep left. I stay out of the town centres.
I work in the estates at all hours so I am probably desensitised, but I do know that random personal robbery for bikes and other such nonsense is pretty much unheard of at that time although I do always assume that anything anyone shouts at me is encouragement. :-)
I am a bit of an Ice-o-phobe so i tend to get a lift/drive if there is significant ice or snow.
Make sure you are lit up well, I use lots of cheapo AAA powered LED lights on the back of the bike and my bag/belt.
Finally get on Strava/MapmyRun and you'll be too busy trying to beast up the hill/beat last nights time to worry about anyone calling you names/being caught.
Dont wear earphones.