The trickiest part of your trip is that it's right in the middle of the most crowded season in Japan, and in fact, the most hottest. If it's in 2020, it would be even worse with the Olympics being held. So booking accommodation and flights can be difficult to do on the spot. For example, the only way to go to Okinawa is by flying. And you don't really want to end up lost or having to walk a lot in the August heat when locals are encouraged to stay indoors for your own health (and Okinawa would be especially hot).
But it is indeed possible to travel on rail (which means excluding Okinawa and most other islands) and take your chances on the non-reserved sections or just stand inside the trains. If you travel to less popular places during weekdays, you are more likely to find accommodation even on the spot. Traveling on boat to less popular but closer islands is also a good option.
Maybe you're more of a Seishun 18 ticket person. Each ticket of this set will allow you unlimited travel for a day on any of the slowest JR trains. And JR trains go almost everywhere in Japan.
https://www.jreast.co.jp/e/pass/seishun18.htmlMeanwhile, you can start using (validate) the Japan Rail Pass on any day you like, and if it's a 21-day pass, it will last for 21 days from the day you start using it. So once you've decided to do a lot of long-distance train travel, you can squeeze that into 21 days and then start using your pass. Do your math and see what ticket/pass suits you best. You don't even have to buy any tickets/passes in advance if you don't intend to save money.
Anyway, one idea is to book accommodation for the first few days in Tokyo, study possibilities of areas with vacant accommodation (either by looking at booking sites or asking tourist info counters and travel agencies), and head for that direction. If accommodation isn't available, you can enjoy day trips.
I'm a local Japanese resident who always enjoy sudden traveling, seeing where a train window can lead me to. If time, money and accommodation isn't a problem, it's perfectly do-able. I've often phoned accommodation in the morning to book, so that I can start my trip (but I speak Japanese).
Just keep in mind that it is against the law to randomly sleep outdoors in Japan, and that you can't board flights unless you are secured a seat.