This sometimes happens. I assume that your computer receives its IP (Internet Protocol) address from a DHCP server. If a network device is inactive, then the server may issue its IP address to another device on the network. The only way to prevent this is to get a fixed IP address from your provider. It will cost you much more. Go to your Network preferences pane and press the Renew DHCP Lease button. This should force your DHCP server to issue you an unused IP address.