When I managed a team of people who had "unusual" working hours I made a point of trying to subtly communicate to people who might get upset what was going on in the team:
"Thanks to Bob working to 3am this morning we are all set to give the demo to XYZ"
Do that before Bob comes in at lunchtime an he get treated like a hero rather than being resented. If Bob is always working funny hours then after a while people accept it and assume that he has always been doing something heroic when he comes in at lunchtime.
Of course, being the manager of such folks you actually do have to be able to know that all this is actually worth it from a business perspective.
Make it clear that it is a privilege which can be revoked. This lets your alpha programmers who like to work odd hours excel and keeps your mediocre programmers who might be tempted to mail it in from even trying it (because there's nothing mediocre devs loath more than heightened scrutiny).