In Japan foreigners cannot simply rent an apartment, and it is also extremely expensive.
In order rent an apartment the landlord will require you to have a job, pay one month rent in addition to one month rent worth for damage deposit plus 1 ~ 2 months rent worth for non-refundable key money.
As well, apartments are very small in Japan, and a 2 bedroom will go for over 130,000 yen per month in Tokyo depending on location.
Check out
http://www.TokyoApartments.com
You'd be better off to stay in several youth hostels as you will likely want to do a lot of traveling, and you wouldn't want to leave all of your stuff in Tokyo for example, when you are traveling to Hiroshima, for example.
There is a ryokan in Asakusa in Tokyo which is actually cheaper than the Sakura Hotel in Jinboucho in Tokyo.
The cheapest form of overnight stay is a stay in a temple; the drawback is that you have to get up as early as the monks do, which could be 4am.
參考: I have been to Japan 5 times, and stayed in many types of accommodation.