I had exactly the same thing as a child, I would often wake up having bled all over my pillow. I stopped getting them for a few years, and then in year 11 just before my GCSEs exams it started happening again. I went to the doctor and they recommended I have the blood vessels in one of my nostrils cauterised (basically sealed off using heat). So I did, and I've not have a nose bleed in that nostril since (I've had a couple in the other one but not enough for it to be worth having it cauterised). If they're happening often, I recommend doing this.