Ja, du musst schlafen.
Would this be correct?
Yes this sentence is correct.
Does this hold true for clauses as well as sentences?
No. The rule is that the second element of a whole sentence is the verb of the main clause. Relative clauses have their verb at the end:
Weil du morgen gut ausgeschlafen sein sollst, musst du schlafen.
In this example the relative clause "Weil du morgen gut ausgeschlafen sein sollst" is the first element of the entire sentence. The verb "sollen" is the last element within that clause (because within such a clause the verb is found at the end). The second element of the entire sentence is the verb "müssen".
Ja, du musst schlafen.
When do words like "Ja" count as "elements" of the sentence?
A very good question. Replace the word "Ja" by the word "Klar" ("of course") and you'll get the following examples:
Klar musst du schlafen.
Klar, du musst schlafen.
In the first example the word "klar" obviously counts as "element" of the sentence while in the second example it obviously does not.
Both variants have the same meaning and (when using the word "klar") both variants are in use.