Sleeping plays an important role concerning your health. It's a very restorative time for your body and brain, so you should ensure you have enough of it and in good conditions.
So if you want to don't be too dependant on the system it means you shouldn't have a rent to pay. This means a lot of money saved not going into a landlord's pocket but it also means not a safe space to call home.
Fortunately, you can be wise and opportunist and find decent alternatives.
The first one is by using couchsurfing. It's a great website where you can sleep on the couch of a total stranger happy to host you for free. Obviously, don't take this as a service similar to an hotel. It's not the spirit. No, here it's more about the exchange, the connection, meeting new people.
It allows you to discover new places with the help of local people.
Usually couchsurfing is only from a few nights to a week max.
Also, you need an internet connection for that, so be sure to check the article about internet.
Another option is to find or be invited to some squats. Many cities have these places even if they tend to be kept a bit undercover for obvious reasons.
It could be challenging at times and often not legal so be sure you know what you're getting yourself into.
Also, another possibility is for you to volunteer. There is many websites online nowadays that allows you to find volunteer positions. Basically, you work between 4-5 hours a day, 5-6 days a week in exchange for food and accomodation. All experiences are different of course but mainly you'll be happily surprised. Even if you don't like the place or people, just jump into the next volunteer place, there is plenty.
If you want to be surrounded by other like-minded people you can type in: "community" in the search to help you find great communities that match your values.
Most of the volunteer websites require you to pay a yearly subscription.
If you do pay, it will make your life easier and you can contact the host and see themp on a map. But you don't have too, using some of the information in their description or by finding their names it's possible to find them on Facebook or on another website. So sometimes it takes a bit of time, but there is also a free way to do things.
# Backpacker hostel / night buses-trains
If you are traveling and have a bit of money you can always sleep at a backpacker/hostel. You can find some very cheap ones.
Also, a nice trick to keep in mind is that you can use night buses or night trains to travel long distance without loosing time (because you're "sleeping"). I say sleeping into quotes because, well.., depending on the bus/train you booked your sleeping conditions won't be the best.
# A car / van
You can also invest in a car or a van and setup a bed inside.
There is really nice van interior that you can find online but you can also keep it simple by putting the back seats flat and dropping an inflating mattress. You can also go to a second hand shop and buy very cheap blankets and stack them up together to create your "mattress".
The main advantages is that your are very mobile and can drive anywhere.