Fasting and prayer are not easy. That’s why the hypocrites loved to show them off. But this passage shows us that this whole principle of “your best life later” applies to the spiritual disciplines of prayer and fasting. We embrace the difficulty, trusting in our Father's reward in the future.
The level of your obedience to Jesus' teaching is the level to which you believe His promises concerning rewards. “Trust and obey” always go together. If we trust His promises, we will be able to obey in secret. If we don’t believe, then we’ll go around begging for others to notice us.