The correct answer here would be B, it is used as an adverb. The whole infinitive phrase can be substituted with an adverb (or adverbial phrase) - "in order to wake up on time", with the adverbial meaning, so it is certainly not an adjective or a noun. It is a verb in the infinitive form.