Mine started to do a similar thing. The preference are set to never sleep, but the machine goes to sleep in the middle of the night regardless, and there are active encode processes. The only thing in the console log is a number of AFP disconnects prior to going to sleep at just before 2AM. Seems to continue to work fine once woken up.
Seems that most sleep issues here are failure to sleep or not waking up.... don't recall seeing one where the machine sleeps regardless. Perhaps it just tired, I have been working it kinda hard
On the off chance, you haven't got a Hot Corner setup under Screen Saver to Sleep the display have you? e.g. Bottom right corner of the monitor = Sleep display.