Hello and hope you are doing well.
Moderate interactions occur between ambien and nyquil. They cause excessive or prolonged CNS and respiratory depression. I would strongly caution you not to drive or operate heavy machinery while on these medications as you might injure yourself or others.
Hope this helped and do keep us posted.