Could the internal anal sphincter relax during sleep?

Yes. it can and does, particularly during certain types of sleep. The external sphincter does not (under more voluntary control). This is what keeps us continent through the night.