It won't be a problem if you and your wife use your accounts on seperate devices connected to the same wifi. But Upwork will take notice if you try to use multiple accounts on the same device. I would stop my wife from using my laptop if she had her own. But fortunately, I don't have a wife so problem solved for me.
I hope you get the point. Don't let her use your laptop for using her upwork account.
I think there is some wisdom in the caution that Waqas is suggesting.
But officially, Upwork does NOT have any rules against more than one person using the same wi-fi network, same IP address, or the same computer. As long as each person only logs into their own Upwork account.
Is it possible that your activity might trip a flag somewhere that causes Upwork to look more carefully at your accounts? Yes, that's possible. But if you're not breaking any rules and if both of you can verify your individual identities, then you won't be penalized.