my son used to encounter this too when he was 2. what we do until now, 1. maghrib close all windows n curtains 2. before gg to sleep, read 3 quls 3x and sapu his whole body 3. close curtains at night when sleeping but leave a night light on. 4. not to let the room be too cold 5. reduce/stop screentime these helped him and us a lot. might not be for your son. but i hope somehow this helps. all the best mummy
Each time before sleep put on minyak bidara at his ear, recite selawat then turn on surah for him to sleep.