This is probably the first word in the Korean tree illustrating 사이시옷. Basically, it is when a ㅅ is inserted to link two parts of a compound word.
The ㅅ in this case (어제+ㅅ+밤) serves as an embedded genitive marker. You can think of it as literally meaning yesterday’s night instead of just yesterday night.
Not even 漢字-derived compound are immune to 사이시옷! Take 숫자, for example. That comes from 수 (數), meaning number and 자 (字), meaning character.