how dangerous is it to wear tampons more than 8 hours?

ive done it before because sometimes i sleep with a tampon instead of a pad, and everything was ok. i also had a friend who wore tampons more than 8 hrs and nothing happened to her either. is it just a precaution?