Nooj wrote:The phrase te dormire is the subject of necesse est. Remember that the subject of an infinitive turns into an accusative, thus explaining te.
That you are sleeping/you sleeping is a necessary thing. Or in better English, it is necessary that you are sleeping.
The place this most often crops up, of course, is indirect statements, but I thought that was only because it's the object of the main verb. (Compare "Putō eum esse stultum" and "I consider him to be a fool" -- here eum/him seems to be an object of putō/consider.)
Imber Ranae wrote:Necesse est can also take ut with the subjunctive (a consecutive clause).