It depends. What you are trying to do is get the antenna high enough so that the path between it and the target antenna has as few obstructions as possible. The higher you go, the fewer obstructions. And trees count too for UHF and above. Let me give you an interesting example in my own recent life. My rabbit ears wouldn't quite get enough reception recently in the front room for one of my TVs. The digital converter box didn't quite get data fast enough to buffer properly. By raising the antenna a mere 2 feet, and mounting it, it worked fine. That 2 feet made the difference. Obviously, I was clearing a few obstacles that I hadn't been clearing before moving it.
If you are mounting your antenna in an attic around here, that means you are still mounting it below or at the height of the nearby rooftop AC units (full of copper piping), and it will not work as well as being above the roofline. In most parts of the country it should matter less though I would think, although any object in the way can reflect or absorb some portion of the signal. I would say that being 5 - 10 feet above the roof line is best if possible, based on my own experience.