It is certainly scarey when it happens to you. Ambien is the culprit, and the only way to wean is start doing without it, but instead of cold turkey, try taking a half of your usual dose for a while, then one quarter, and start staying up later and getting tired more naturally.