On rare occasions, Notaries are presented with the signature of a deceased individual and asked to notarize it — an official act that should never happen. It's clearly impossible for a deceased signer to personally appear and be screened for willingness and awareness.
The only possible exception — under very limited circumstances — may be if a subscribing witness saw an individual sign a document while still alive, and then requested a proof of execution by subscribing witness after the principal died. In a proof of execution, the subscribing witness appears before the Notary in place of the principal signer and swears or affirms the witness saw the principal signed the document. However, proofs of execution have very strict limits placed on them in most states. Be sure it does not conflict with your state's rules, and contact the NNA Hotline or your state Notary-regulating agency if you are unsure whether it is acceptable or not.
If a person requesting to have deceased person's signature notarized is unsure how to proceed, the person should seek the advice of an attorney.