Answer by Professional Japanese Teacher
Pardon me for leaving firs
You can use “おやすみなさい oyasuminasai” to say “good night”. This phrase is usually said just before going to bed but you can also use it when bidding your friends good night. You can also drop the “なさい nasai” completely from the phrase and say “おやすみ oyasumi”, which is the casual version of this phrase.
If your boss or someone senior is also at the dinner, instead of saying “おやすみなさい oyasuminasai”, maybe it would be better to say “お先（さき）に失礼（しつれい）します osakini shitsureeshimasu”. This literally means “pardon me for leaving first”. Since this is a work-related dinner, it never hurts to be a bit more polite, especially if you are new at the company.