Usually, your wife or husband should not witness your signature. Whether or not you can witness a signature depends on the nature of the agreement that you are witnessing. Usually, it is best practice to have a third party witness your signature. You should particularly not witness a signature where your wife or husband is a party to the agreement. If you are signing a deed, a third party should witness your signature and again they should not also be a party to that agreement.
As long as your spouse is not party to the agreement there should be no problem. like is your wife a co-owner?