It depends on how much protection was given between the actual heating pad and one's self. It is highly recommended not to lie on one for longer than hour because severe burning of the skin can occur. if you feel like you have a bad burn, it is best to check it out with a doctor to make sure it's not a second or first degree burn.
Nothing bad will happen, if you fall asleep, on a heating pad. It won't hurt your body, to leave it on. You might find, your skin is either red or hot, when you look at it or touch it. Your back probably feels better, after the heat was on it.