"Laughing to myself" is explained here: https://forum.wordreference.com/threads/laugh-to-myself.1707033/
Imagine a situation where you find something very amusing but it would not be appropriate to laugh out loud. So you suppress all outward signs of laughter, but you enjoy the amusement of the situation. You would have laughed otherwise.
Is there a German equivalent to this phrase?