In the 18th century 'night music' was frothy, sociable and light--party music. But with the beginning of romanticism it became a time of inner contemplation, of expressive intimacy. The early forerunners were keyboard music by Bach's son C. P. E. Bach (1714 - 1788):
Notice the free, improvisatory nature of the music, a fantasia. By the early 19th century Václav Tomášek (1774 - 1850) was writing Eclogues that expressed the dreamy atmosphere of romanticism. Unfortunately YouTube seems to have none of his solo piano music so this is the closest example I could find. (It is very rare that I can't find the right musical example on YouTube...)
At about the same time, the first decades of the 19th century, John Field (1782 - 1837), the Irish pianist/composer, was writing the first nocturnes for piano, expressing nothing but the inner feeling of the player:
In this music time seems suspended. It is like those moments in opera when an aria is sung, expressing some particular emotion by a character. The narrative time stops temporarily. The transference of this effect to instrumental music is characteristic of romanticism. The idea or effect, is of inducing a kind of trance with music and in so doing taking possession of one's inwardness. This kind of music reached its culmination with the music of Frédéric Chopin (1810 - 1849):
There are a few examples of piano 'night music' in the 20th century, one of them by Béla Bartók (1881 - 1945):
This little survey of 'night music' is almost a history in miniature. In the 18th century the night was a time of sociability, of pleasure, of entertainment. In the 19th century it was a time to go inside oneself, to muse, to contemplate. But by the 20th century, the night had become a strange, threatening place with unidentified sounds of insects and birds and a harmony that, instead of suggesting dreamy contemplation, rather gives the impression of unease, of anxiety...