All perfect praise be to Allaah, the Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It is not permissible for a Muslim to swallow blood deliberately whether during fasting or at any other time because blood is ritually impure according to the majority of scholars. Blood does not usually move in the mouth like saliva, so it breaks one's fasting. Thus, it is obligatory for a person who suffers blood flowing in large quantities from his mouth to spit it out as much as he can and not to swallow any of it deliberately. If any blood is swallowed deliberately then the fasting would be invalid and that day must be made up for.
In Al-Mughni, Ibn Qudaamah said, “If one's mouth bleeds or fluid from the stomach reaches it and then he swallowed it again, his fasting would be invalid even if it was little, since the mouth is considered an outer part of the body. In principle, anything that goes from the mouth to the stomach breaks the fast with the exception of saliva because it is not possible to avoid swallowing it. This principle applies to anything other than the saliva.”
There is no blame on you for the blood which enters your throat during sleep because the sleeper is not competent for religious assignment. In an authentic Hadeeth, the Prophet, sallallaahu ‘alayhi wa sallam, listed three types of persons who are not to be held accountable for their actions. These three types include the one who is asleep until he wakes up. The blood swallowed during your sleep does not break your fast.
And Allaah Knows best.