There are differing ideas on that veronica. Some do say it can be useful to do 'Active Fasting' to encourage sweating and other things to assist with detox. Most fasting authorities do say to rest while fasting though. Both can work, the important thing is to learn to listen to your body and not to overdo things, or attempt something evvervating like gym or sauna while fasting if you don't think your body is up to it.
I have done both myself, fasted with heaps of exercise and also with heaps of rest, and sometimes both! That is, exercising lots but making sure I rested prior to it and afterwards more than I usually would. Both Active Fasting and resting while fasting have their merits, it's a matter of seeing how your body copes with it's fast and safely experimenting. We can get away with a few generalisations at times when describing fasting but overall it is a very individual experience.