i have giggled at inappropriate moments as well when Master has had a flogger in hand. Sometimes its because i'm tired, other times because like you i have thought of something that made me giggle. It's very hard to stop when you get the habitual out of control giggles because the more you think about it the harder you giggle because you are giggling in the first place. i just take a deep breath and ask for a moment to compose myself. Eventually it works. Hopefully your Master understands that you are not laughing at Him and rather its a case of nerves, being tired, etc.