In Germany, wild camping is prohibited in most places, including all forests. The situation is less clear for sleeping in the wild without a tent, which is usually not explicitly prohibited on public land outside of protected areas. For a German language article discussing the topic in some detail, see bergfreunde.de: Schlafplatz gesucht.
A situation not covered in that article is sleeping in a basic shelter / lean-to such as:
Source: Wikimedia Commons
Those who have hiked in the forest in Germany will probably have passed such shelters frequently. They're intended as a semi-weatherproof shelter for resting during the day, but if I just so happen to fall asleep and don't wake up until the following morning — is this forbidden like wild camping, or is it rather undefined like bivouac appears to be?
I'm interested in the situation anywhere in Germany, but primarily in Hessen, Baden-Württemberg, and Bayern.