Once in a while, some random memory from my past pops into my head for no discernible reason. If it's a funny memory, I tend to laugh out loud. At those times, I'm always grateful if no one is around to question my sanity.
When people are around and I laugh, especially if it's a solemn occasion, I pretend I wasn't laughing and cough into my sleeve as if I had been coughing all along. I don't suppose it fools anyone, but it makes me feel better.