When you do something mercifully, you do it in a kind, sympathetic, or humane manner. If you're absolutely starving after school, your parents might mercifully bring you a snack to eat on the way to soccer practice.
Mercy is the quality of being forgiving or compassionate, and when you act mercifully, you behave in a forgiving or compassionate way. This word is also frequently used to mean "fortunately" or "luckily" — like when a bad movie is mercifully short or a hot day turns into a mercifully cool evening. Mercy and its related forms derive from the Latin word merces, meaning "reward" or "pity."