Npexp, next time you add examples in a new post on a thread, please use new numbers so no confusion arises between the first and any following set of examples.
In answer to your first question above, I think "a very good student always doing his homework" and "the only student to do his homework" are noun phrases functioning as adverbials of reason where the introductory participle "being" has been omitted.
In reply to your second question:
Is "before going to bed" a non-finite temporal adverbial clause or is "going to bed" a NP?
the whole phrase is a time adverbial, formed by a preposition (before) and a gerund phrase (going to bed).