Most animals move about a bit during sleep, both for ease and in dreams. We do!
The most important senses - sight, hearing and touch - do not close completely but turn themselves down to a sort of alarm setting. So so your cats are probably responding to the sound of the rain, especially if it starts after they had fallen asleep.
Cats are also among the animals that can move their outer ears to refine the direction of sound coming to them. The movement is short and rapid enough to appear to us as a twitch. It's also something we can't do: ear-waggling tricks are just facial-muscle tautening that does not affect the hearing.
(We close our eyes in sleep, but the lids are just translucent enough for a response to a sudden rise in light level, as when someone switches the lamp on.)