Doctors generally consider trazodone safe in small doses for sleep disorders, such as insomnia. But it may not be as effective as medications such as Ambien for these sleep disorders. If a person is having trouble sleeping due to depression, they may require a higher dose of trazodone.