1 has a different meaning.
Midnight snack refers to a snack that eats a certain food at night. For example, when you go out at night, you will find many stalls set up by vendors on the roadside. Snacks bought at food stalls and so on. On the one hand, midnight snack refers to what you eat at night (between 0 am and 4 am), on the other hand, it refers to wine, food and snacks you eat at night, especially late. There is almost no difference between the choice of supper and dinner. Compared with dinner, supper has more snacks that are not easy to eat, such as barbecue, soup and all kinds of small fry.
Second, the parts of speech are different.
Midnight snack belongs to gerund and is a spoken language in life. Midnight snack is a noun and a written language. In the Song and Yuan Dynasties, the word supper was common in poetry, and the earliest record that can be found is that Fang Gan mentioned in his poem "Park Monks' Courtyard on Winter Night" that "no wine can make supper and monks close early". The midnight snack here means to kill the night with wine and food. Since the Qing Dynasty, the word midnight snack has sometimes been written as midnight snack. Because midnight snack is midnight snack, it is also called midnight snack.