check out
www.djh.de to get an idea about youth hostels in Germany - many offer beds in the 15 - 20 Euro range, even in the high season.
Hotels may be a little harder to come by - generally, prices tend to be cheaper in southern Europe, eastern Europe or out in the countryside. For example, there is a guesthouse in our neighbouring village that advertises overnight and breakfast for 25 Euros - it is on the train route, but is a good hour from Trier, and 1 1/2 hours from Cologne, so it's a trade off $$$ for convenience.
Also check out
www.accorhotels.com and take a look at the Formule 1 hotels. They're probably the cheapest chain you'll find, I think in the 25 Euro range, and very basic (shared loos), but are generally closer to the big cities than the guest houses I'm talking about.
Your cheapest bet in the off-season is probably to find individuals with rooms to rent out, though this is pretty labour intensive in the research dept. Sometimes if you contact the city tourism offices, they have a list that they can pass along to you.