You can choose between the immediate-release and extended-release versions of this drug when you buy Ambien online. The quick-release tablets work by immediately releasing the medicine in the body and makes you fall asleep. In contrast, extended-release tablets work in two stages. First, the pill dissolves the outer layer to induce sleep, and the second layer will release the medicine slowly overnight to make you stay asleep for longer.