Don't get me wrong. I'd never advise anyone to write side-project code at work. In addition to being unethical, it's also patently idiotic. I'm talking about the case where someone gets up at 5:00 am to write the side-project code on his own resources and then gets sued because his former company decides to be a scumbag.
First, no there isn't. You can fire someone because he's incompetent because he gets too little sleep to do his job, but suing is ridiculous. What if he just has insomnia?
Second, my assumption was that getting up at 5 am implied going to bed earlier. If you're sleeping 1 to 5 and have normal sleep needs, doing this for any length of time will ruin both the side project and the day job.
Most people would be more productive on their side project and at work if they got up at 5:00 am to pursue some kind of passion.