Here's the section of the Terms and Conditions pertaining to Nights credit (emphasis mine):
4.2.a.
Only nights personally stayed by and individually billed to
an Elite Member at Participating Properties are credited toward the Elite Member’s Elite membership achievement and renewal thereof. Pursuant to section 1.4.e. Accounts may be combined to achieve Elite membership.
i. Pursuant to section 2.1.a., one Elite Night Credit will be awarded to the Elite Member room for each Qualifying Night stayed.
Source:
https://www.marriott.com/loyalty/terms/default.mi#elite
Since you physically can't stay in two different rooms simultaneously, you can only get Night credits for one room.