Terminals 1-2 at BER are open around the clock, so you may be able to stay overnight at the airport for very early departures. Please note that only passengers with valid travel documents are permitted to stay in the terminal buildings at night. Terminal 5 is currently closed due to low passenger numbers.
There are also hotels in the immediate vicinity of Terminals 1-2 and 5 that offer further overnight accommodation. The journey time with the S-Bahn lines S9 and S45 from Terminal 5 station to Terminals 1-2 is 8 minutes.