Yes, sleeping can be counted as fasting. You can practice intermittent fasting and make the most out of healthy sleeping habits for weight loss.