I've had this problem all my life too. Any time that I can't find appropriate words to say, I end up sniggering. It was worst when I was a kid. If I had been naughty, I would end up sniggering while my parents or a teacher were telling me off, then get double punishment because I "thought it was funny" to get in trouble. Same as AntisocialButterfly, I had it pointed out to me by counsellors when I was talking about the darkest thoughts of depression.
I got nick-named "Basil Brush" when I was younger because of it, and people would point out when I did it with his catchphrase, "boom, boom", which I found acutely embarrassing. You probably have to be a Brit of a certain vintage to get that reference - he was a kid's TV puppet character who was known for his inappropriate humorous interruptions when the guest celebrity was trying to tell a story, followed by "ha ha ha, boom, boom".
_________________
When you are fighting an invisible monster, first throw a bucket of paint over it.