It may not.
Apparently (at least tonight) the N770 line Paris-Copenhagen in particular does not take the ferry route via Puttgarden-Rødby, but rather crossed the Danish border at Padborg in Jutland. There was indeed a quick passport control there around 5 AM, but there was no need to exit the bus.
The FlixBuses to Denmark from Germany do indeed generally* take a ferry from Puttgarden to Rödby.
The ferry departs every 30 minutes and there is a passport control so you have no option sleeping through.
Once on the ferry you are required to leave the bus. You can sleep in various places on the boat but keep in mind that the driver will not wait for you - ...