What would be the purpose of doing so?
Japan does not have free health care and the child would not be a Japanese citizen. Also you would need to qualify for a visa that would allow you to be there for that long, visa waiver entry is only 90 days. Also, you would almost certainly need at least a basic level of ability in spoken, and probably written, Japanese. You would also have to find a hospital that would accept you as, unlike the US, they don't have to.
If you were able to get an appropriate visa and able to pay for living expenses and medical expenses I guess it would be possible.