The Messenger of Allah ﷺ forbade cupping for the fasting person and continuous fasting only out of consideration for his companions. He did not declare them forbidden.They said, "Messenger of Allah, but you yourself practice continuous fasting."He replied, "I am not like any of you. I spend the time with my Lord feeding me and giving me to drink."
حدثنا وكيع حدثنا سفيان عن عبد الرحمن بن عابس عن عبد الرحمن بن أبي ليلى
إنما نهى رسول الله ﷺ عن الحجامة للصائم والوصال في الصيام إبقاء على أصحابه لم يحرمهما قالوا يا رسول الله فإنك تواصل قال إني لست كأحدكم إني أظل يطعمني ربي ويسقيني
Its isnad is sahih, and this is a sound explanation reconciling what has been reported that the Prophet was cupped while fasting with the hadith "the cupper and the one cupped have broken their fast." The hadith has already appeared at 22966.