If it is (my) OctoPrint Connection plugin, that should also accept IPv6, or a hostname.
When starting, your Raspberry Pi asks your router for an IP address that it can use. If it has not been too long since the last time, it will get the same IP address that it used the last time; the router gives the Pi a "lease" on that IP address with a certain time limit that gets renewed each time the Pi uses the IP address. That's why sometimes after a while of not using the Pi, it will get another IP address.
In this case, it seems like the router did not give the Pi an IPv4 address, but only an IPv6 address. That could be because of a configuration error in the router, or because the router ran out of available IPv4 addresses in the "pool" of addresses that it has available (ie: all of the available addresses have been leased out). That normally does not happen.
You can ask your router what's going on:
sudo dhclient -v