My son would sometimes do the same thing before naptime and bathtime - I'm sure if it was purposely or not but we have begun to ask him if he has to go poo-poo/pee-pee before he goes for nap/bath/bed - and we ask him to try to go. We have not introduced the potty yet but I know a lot of people that introduce it early and stick their lo on it for a few min. before bed/bath/nap etc. My son will now look down at his diaper and really try to go before these times, then we cheer for him when he does go. You could try something similar?? Or, just change your lo's diaper and go back to the regular bedtime routine. If he sees that the routine is changing a lot then he will probably continue to do it. IS this his regular time to go?? If it is, then you could try asking him to go before you start the bedtime routine.