Which would be more likely to cause the amnesia side effect some sleep meds can cause, zolpidem or temazepam?

Could be both. Since both have anti-cholinergic effects, either could be the culprit but together, likely additive. If you are taking both, have a in-depth discussion with your doctor.
Both. Both of these addictive sleep medications can cause this side effect.