There exist two competitive models to describe constructions like "on the night of the first day".
One model can be called concatenative. Under this model, "on the night" is one prepositional phrase, "of the first day" is a second prepositional phrase. Personally, I don't subscribe to this model, so I cannot tell you with certainty that this model suggests that the second phrase modifies the entirety of the first.
The other model could be called the embedded model, the recursive model, the reductive model or the nesting model. I do subscribe to this model, and Mitch has already provided a sufficiently accurate top-down explanation of how this model works. The only addition I can make is to provide the bottom-up view.
At the very bottom (or, if you prefer, at the deepest level within the recursion) is the noun "day". Both "the" and "first" directly modify this noun, giving us the nominative phrase "the first day". In turn, "the first day" is the object of the preposition "of". The prepositional phrase "of the first day" is complete and coherent.
That phrase is one direct modifier of the word "night". The other direct modifier is, once again, the definite article. This gives us the coherent nominative phrase "the night of the first day".
On our last turn, "the night of the first day" is the object of the preposition "on". This yields your original phrase, which both models accept as a complete and coherent phrase.
The effective difference between the two models is that the concatenative model does not propose that "the night of the first day" -- although on its own a coherent nominative phrase -- is a phrase that occurs in the construction "on the night of the first day". That stands not only as the difference between the models but also as the reason that I reject the concatenative explanation.
In either case, "on the night of the first day" includes two prepositional phrases. Under the concatenative model, those phrases are "on the night" and "of the first day". Under the nesting model, they are "on the night( of the first day )" and "of the first day". I prefer the nesting model because "the night of the first day" makes sense on its own, whether within or without a prepositional frame.