King and Viceroy
At first glance it would appear certain that King David himself is not the King Mashiach who will be  "a Nasi for them forever" - because the activity of the King Mashiach will begin before the Redemption, as explained by Rambam,  and certainly before the Resurrection of the Dead.
The Talmud Yerushalmi,  however, makes the following statement concerning the King Mashiach: [The standard commentary entitled Pnei Moshe explains]: "If he is one of those alive, his name will be David; if he is one of the dead, he will be David himself." Likewise, the hymn entitled Ometz Yishacha (which is read on Hoshana Rabbah)  includes the following line: "The voice of the herald [i.e., Eliyahu HaNavi] proclaims: 'There has appeared a man, his name is Tzemach,  ]it is David himself!'" 
This may be understood to mean that the soul of King David will be garbed in the King Mashiach.
Similarly, the Sages teach that  "the first redeemer is also the last redeemer" (even though Moshe Rabbeinu was a Levite whereas Mashiach stems from the tribe of Yehudah), which means that the soul of Moshe Rabbeinu will be garbed in the soul of the King Mashiach. 
Likkutei Sichos, Parshas Vayigash, 5751 
- (Back to text) Yechezkel 37:25.
- (Back to text) Rambam, Hilchos Melachim 11:4.
- (Back to text) Berachos 2:4.
- (Back to text) Siddur Tehillat HaShem, p. 334.
- (Back to text) Cf. Zechariah 3:8 and 6:12-13, and Targum there; Talmud
Yerushalmi, Berachos 4:4.
- (Back to text) See: Commentary on the Siddur by R. Yeshayahu Horowitz (the
Shelah); Commentary on the Siddur by R. Yaakov Emden; cf.
Yirmeyahu 33:15; Zohar I, 82b; II, 332b.
- (Back to text) Shmos Rabbah 2:6.
- (Back to text) Or HaChaim, Parshas Vayechi 49:11.