Belsomra and Ambien are two brand name drugs indicated to treat insomnia. While both drugs are able to treat the disorder, they are chemically different with different mechanisms of action. Belsomra works by interacting with orexin receptors while Ambien exerts its effects on GABA A receptors.