Unless you're a punching bag, tub of Vaseline or a pedicurist, no this isn't flattering... on its own.
But it's important to state that I do not know the context in which the statement was said.
What's more, the author of, "You're my stress relief" likely didn't mean to demean or belittle you. I refer you to one of my earlier articles in which I present the valuable case study of a one Brad Womack - last season's Bachelor. His vocabulary was limited to about 13 adjectives and 14 nouns, which required the ladies and the audience to read between the limited lines. His range of words sucked, but his range of emotions may have been quite wide. Then again maybe not, but the point is there isn't always a one to one correlation between a statement and its intent.
You see, someone playing the role of "Stress Reliever" in a person's life can be a wonderful component of their overall relationship. Mrs. Funny Guy is a stress relief to me because she loves me unconditionally, inspires me, supports my dreams, and yes, has sex with me. In this context, being a stress relief doesn't equate her to a Pocket P*ssy, but a positive and powerful presence in my life.
My suggestion: ask him to try and flesh out his statement. Encourage him to explain. Is he strictly referring to you as a means of relief or release? Merely flesh or a complete body of good?
My ex once told me I cause him miscellaneous stress. What the hell does that mean? He explained it but I still didn't get it 100%. I took it as I caused him stress but not a lot... still confused. Just another red flag I shouldn't have ignored, but did only to be in a relationship.