Your Green card is meaningless for the purpose of transiting Japan
However, if and only if there are no connecting flights to your destination on the same calendar day, you can enter Japan visa-free, by presenting your passport and connecting boarding pass, and stay for up to 72 hours.
As stated by Timatic, the database used by airlines and based on live info from the Japanese government:
Holders of onward tickets transiting to a third country can
obtain a Shore Pass on arrival for a max. stay of 72 hours
only if there are no connecting flights on the same calendar
In fact, if you're connecting at any airport other than Tokyo-Haneda or Osaka-Kansai, and your connection is overnight, you'll have to enter Japan, as the other airports close at night.
If you have an overnight transfer at any airport other than Tokyo-Haneda or Osaka-Kansai, ignorant check-in staff may try to deny you boarding without a visa. In this case, ask them to check Timatic and tell them you're entering under the Shore pass arrangement.
NOTE: other answers have suggested the issurance of Shore Passes is restricted to emergencies. It is not. It would have been correct in 2014, which was reflected by the Timatic info at the time.
On Tripadvisor, one user cites Timatic from 2014:
Only in exceptional circumstances (e.g., delays, missed connections or re-routing), visitors continuing their journey to a third country can obtain a Shore Pass/Transit Pass on arrival for a max. stay of 72 hours
Since it isn't expressed like that anymore, the Immigration Bureau in Japan has obviously informed IATA of having become more liberal in granting shore passes.
For what it's worth, I called the Immigration Bureau's head office yesterday, and was told that Timatic was up-to-date (I explained what it said, and asked if there were any further restrictions, to which they said no)
So again, you do not need a visa, and again, if an ignorant check-in clerk tries to deny you boarding, ask them to check Timatic, because, although immigration authorities aren't bound by it, check-in staff for IATA-connected airlines (the vast majority) definitely is