They are not necessarily binary compatible. That being said, most packages will probably work fine. I've done this on occasion and I've never had a problem.
Although, it's not recommended to mix Debian and Ubuntu packages on a single system. If you're going to do it try to keep it at a minimum. If you're pulling in too much of the other, then perhaps you really just want the other. I'd say by the time you feel you need to add a foreign source you're probably running the wrong one.
The closer in time the freeze of the two releases (i.e., the freeze of Ubuntu LTS and Debian's release) the better compatibility you'll have.
If it's a third party package in deb format that says it's for one, it will almost certainly work on the other with few issues.
Keep in mind that this is anecdotal and just my experience. There really is no guarantee or even implication of cross-compatibility. Don't expect either the Debian or Ubuntu communities to give you much sympathy if things go wrong. In that event you're mostly on your own. As long as you're okay with that then feel free to give it a try.