How do you fix this modifier-subject mismatch. When sleeping on his back, my dad snores like a foghorn.
Why do you think this is a mismatch? Your dad is the one sleeping and snoring, so this seems okay as is. I've probably missed something, but what do you think the problem is?
You could also say "When he sleeps on his back, my dad..."