Assuming "sleep in" and "oversleep" mean the same thing, it seems there's something missing in "sleep in." What is supposed to follow after "sleep in?"
Although the use of in may imply being in something, it's not said.
It has much the same usage as stay in:
"Are you going to see the carnival?"
"No, I've decided to stay in."
As commented, it usually indicates a deliberate (or at least, non-accidental) action. That nuance may not be entirely clear in dictionary definitions.
sleep in Phrasal verb
Remain asleep or in bed later than usual in the morning.
‘life assumes a different rhythm on the weekend; we sleep in, cut the grass, wash the car’
Sleep by night at one's place of work.
Oversleeping is generally not intended to happen.
Sleep longer or later than one intended.
‘we talked until the early hours and consequently I overslept’
Sleep in often means intentionally staying longer in bed
It doesn't necessarily mean asleep at the end interestingly enough, and might include activities such as breakfast in bed
He knew that he would have a good sleep in the next day
Oversleep often means accidentally sleeping too long
Suddenly she woke up and realized she had over-slept
If you are late for work you would apologize for having over-slept but if you said you had a sleep in your boss would give you a strange look (US culture).
Language Log gives an interesting insight on the use of the preposition “in” for the expression “sleeping in” meaning sleeping late:
The original idea of the "sleeping late" sense is that "in", meaning "in one's house" or "in one's bed", is opposed to "out", meaning "out in the world" or at least "out of bed". In addition to the OED's reference "to lie in", there's the verbal form "to stay in", and the noun "shut-in", with similar meanings of "in one's dwelling". The idea of being "in" rather than "out", associated with sleep, then takes on the extra connotation that one is staying "in" while sleeping during a period of time when one normally would be "out".
I hope this clears it up for you.
"oversleep" is only used when one has an obligation to attend to at a more or less specific time, and they unintentionally sleep too late to be able to carry out that obligation. It is only deliberate if one is prone to laziness.
EXAMPLE If you are supposed to meet someone at 9:00 AM and you wake up just before or some time after 9:00 AM, then you've overslept. Maybe you forgot to set your alarm. No matter the cause, the time at which you awoke prevented you from arriving on time. You would tell the other person "I overslept." (unless it's your boss😁)
Present - (I, you, they, we) oversleep; (He, she, it) oversleeps
Past - Preterite: overslept ("I overslept".) Imperfect: oversleep ("I used to oversleep.")
Gerund - oversleeping
To "sleep in" means to make an intentional/deliberate choice to sleep later than is customary for you. The prerequisite for using "sleep in" is that you have no pressing obligations during the time you choose to sleep later than is customary for you. People have different sleep schedules, so the term is used relative to an individual's customary time for getting out of bed.
EXAMPLE Let's suppose you usually get out of bed no later than 9:00 AM on any given day. But one morning (or the prior evening) you find yourself in need of more sleep, and you have no pressing obligations to attend to. So, you decide to sleep until 11:00 AM. Deciding to sleep later than is customary for you is called "sleeping in". If you make this decision the preceding evening can you can say "I'm going to sleep in tomorrow." You can even say it days in advance if you know you'll be needing extended sleep at some future date - example: "It's only Wednesday and I'm exhausted from work. I'm going to sleep in on Saturday."
There's one more example that involves customary sleeping/waking behaviors. Suppose you and a friend always get together at 5:30 AM on Saturdays to go fishing. But one day (let's say on a Friday, the day before you ordinarily go fishing) you decide you will be too tired to get out of bed early enough to join your friend. You can tell you're friend: "I'm not going fishing tomorrow. I'm very tired. I'm going to sleep in." This example has nothing to do with the latest time you ordinarily allow yourself to sleep. Instead, it has to do with a customary behavior (going fishing at 5:30 AM on Saturdays) that requires you to wake at a specific time. If you choose to sleep beyond this customary meeting time, you can use "sleep in".
Citations: over 50 years of using them
By sleeping-in we mean sleeping a little longer than usual. Suppose you wake up by 6 AM every day. So on a Sunday you might sleep till 7 AM or a little later. Over-sleeping, on the other hand, means sleeping longer than one intended to. For instance, when your alarm rang, you hit the snooze button but then fell asleep again and woke up one hour later. That's over-sleeping.
"sleep in" seems to be an example of a phrasal verb, which is formed by combining a verb with one or two prepositions and/or an adverb. For example, "look after" means care for, "look for" means search, "look into" means investigate, "look up" means research, "look up to" means respect, "look down on" means disrespect, and so on; see also Why do some verbs have “directions” as adverbs? and Why do we use 'up' as adverbs for verbs? Phrasal verbs are basically a sort of idiom, and the meaning of the phrasal verb is often unrelated to the meaning of the preposition.