It is always ok to laugh, even at death and loss. Sometimes it is just more courteous to laugh to yourself.
"Anything worth taking seriously is worth laughing at." That works both ways. However not everyone sees the humor, joy, or sadness in every laugh, or every circumstance.