Debian Policy says
9.1.2 Site-specific programs
As mandated by the FHS, packages must
not place any files in /usr/local,
either by putting them in the file
system archive to be unpacked by dpkg
or by manipulating them in their
There is no such specific prohibition against /opt. Policy also adds
The location of all installed files and directories must comply with the
Filesystem Hierarchy Standard (FHS), version 2.3, with the exceptions noted below,
and except where doing so would violate other terms of Debian Policy.
and the File Hierarchy Standard says
The directories /opt/bin, /opt/doc,
/opt/include, /opt/info, /opt/lib, and
/opt/man are reserved for local system
and then further down
Distributions may install software in
/opt, but must not modify or delete
software installed by the local system
administrator without the assent of
the local system administrator.
Note that Policy is for Debian itself, but it generally corresponds to a best practice recommendation. The upshot, if I am reading this correctly, is that it is not Ok to install binary (deb) packages to /usr/local, but it is Ok to install in /opt as long as it does not interfere with the sysadmin's use of the space.
My personal opinion is that it is a bad idea to have deb packages in either /usr/local or /opt. I disagree with D4RIO when he says
There is a couchdb package for debian (I mean, official), so if you downloaded
another, it's Ok, it must be installed in /opt or /usr/local/bin either.
You don't generally want two different deb packages corresponding to the same software installed, and if they are actually the same package name, dpkg won't allow it anyway. Unofficial Debian packages of software available as an official package commonly (but not always) have the same name as the official ones; you just install one or the other, not both.
For what it is worth, I think putting deb packages in /opt is a bad idea, and the only recent occurrence of this I've seen is with Google Chrome. However, Google does not always follow best practices.