There currently are a variety of options to travel by night train from Hamburg (Germany) to Stuttgart (Germany), taking between approximately 8 and 10 hours: Namely the ICE 699 and the ICE 619. These lines are operated by DB.
Deutsche Bahn (DB) exited the actual night train business in 2016. However, it operates around a dozen Intercity and Eurocity trains that run exclusively at night. In these night trains, there are only first and second class seats. The lights stay on all the time and there is no way to recline the seats.