A. "To" is often a preposition, but when it occurs in front of a verb, like "to sleep," it is part of an infinitive. Infinitives are verb forms that function as something other than a verb.
Click the following link to see more about infinitives: verbals