Sleeping in the Sukkah is something the Talmud requires. Commentators ask why we don't recite a blessing over sleeping in the Sukkah. One answer is that we can't be certain that we will fall asleep, and when in doubt we skip the blessing lest we use God's name unnecessarily. The idea that through sleep one fulfills a mitzvah is strange as usually one must be awake and conscious to fulfill a mitzvah. Some suggest that Yom Kippur elevates us to such an exalted position that even in our sleep we're able to do mitzvoth.