When you're wearing a retainer you really should keep the retainer in your mouth during the day and night for at least the first 6 to 7 weeks.
This will allow the retainer to keep your teeth straight and then after 7 weeks you can usually stop wearing the retainer overnight and only need to wear the retainer during the day.
So during the first 6 to 7 weeks your teeth could shift without the retainer overnight but after 7 weeks your teeth should stay straight and not shift.
But anything is possible and if they do shift overnight then you'll need to have a new retainer fitted because your old retainer will be too tight which can damage your teeth.