Could you tell me what happens if you accidentally sleep in your contact lens overnight?

Usually nothing. Unless this happens with hard lenses, there is little likelihood that you will have a problem if you sleep overnight with a lens in. Hard lenses can prevent oxygen transmission and you might developed an erosive syndrome which will clear when you remove the lens for several days. As a general rule, if the eyes become red for any reason or the vision drops, then take out the lens until cleared.