Thanks for query,
It is possible that due to nasal congestion
there is sore area in the nose and blood coming from there and collected in the throat which spit while getting up from sleep.
If your gums are not healthy and some infection like gingivitis
,blood may come from there.
Take nasal decongestant medicines and treat if dental problem is there.
ok and bye.