I used to work an 8 hour day, then go home, have dinner and go to bed immediately after. I then got a few hours sleep and woke up refreshed and with a clear brain between midnight and 2am. I then coded for a few hours until I started feeling tired again, went to bed, caught an hour or three of sleep and went to work. This had the benefit of me being better rested for my nightly hacking than for my daytime job, which didn't require my full alertness (I was stuck in a dull job at the time). The downside was that I had no social interaction with people in my timezone (other than at work).
Sorry I can't do better than Wikipedia; apparently this is 'segmented sleep' [1], and before electric light it was entirely natural. Apparently the extra hours were used almost exclusively for sex, since there was no electric light.