what does the bible say?
In the Old Testament, prayer and fasting usually happened when the people of God needed protection or deliverance (Nehemiah 1; Daniel 9:3; 2 Samuel 12:16, 21–22; Esther 4:16). In the New Testament, prayer and fasting were often practiced during times of spiritual warfare, such as when Jesus was led by the Spirit into the wilderness before He was tempted by the Devil (Matthew 4:1–11; Luke 4:1–13). Another example is when Jesus’ disciples had tried and failed to cast a demon out of a boy and He reprimanded them, saying (in some manuscripts) it was due to their failure to fast and pray (Matthew 17:21; Mark 9:29). Jesus made it clear that praying and fasting should not be done to get attention or admiration from others but in secret where only the Father can see and then reward us (Matthew 6:18). Moreover, other New Testament heroes of the faith such as Anna the prophetess and believers from the church of Antioch demonstrated what God-honoring fasting and prayer looks like (Luke 2:37; Acts 13:2).