Cryptomnesia
Cryptomnesia occurs when a forgotten memory returns without it being recognized as such by the subject, who believes it is something new and original. It is a memory bias whereby a person may falsely recall generating a thought, an idea, a tune, a name, or a joke; they are not deliberately engaging in plagiarism, but are experiencing a memory as if it were a new inspiration.