A stroke can happen while someone is sleeping, and commonly does. This is somewhat frustrating for both the patient and the doctor, as a patient who suffers such a stroke is often not amenable to our rapid therapies. The reason being is that the "acute stroke" therapies (far and away most commonly being intravenous TPA) become very dangerous when given more than 4.5 hours after a stroke onset in a younger person, and 3 hours after a stroke onset in an older person.
When a stroke occurs during sleep, particularly an ischemic stroke (different than a bleeding stroke), they are usually painless and therefore the patient and family is unaware that a stroke has occurred until the patient wakes up and realizes that they are weak, numb, can't speak, etc. Since a clear time of onset is not known, these strokes are notoriously difficult to treat with "acute stroke" therapies such as intravenous TPA.