Even without bolding the noun clauses, it's clear which are noun clauses in these sentences.
1. The noun clause is what I saw in the closet. It serves as the subject. The subject performs the action, here, the noun clause is what made the narrator speechless. To check, replace it with a pronoun like it: "It left me speechless"—showing it acts as the subject.
2. The noun clause is how to swim. It functions as the direct object. Direct objects answer the questions "whom" or "what." For example: "What did I learn at six?" The answer is "how to swim."
3. The noun clauses are what my conscience was telling me and what I wanted to do. They act as the objects of a preposition. These come immediately after a preposition. Here, "between" is the preposition, and the clauses following it serve as its objects.
4. The noun clause is what kept me awake all night. Its role is predicative nominative. A predicative nominative is a noun or clause found after a linking verb connecting sentence parts. Here, the linking verb is is, followed by this noun clause as its nominative.