There are a few reasons why peppered moths are nocturnal:
* Predator avoidance: The moths are vulnerable to predators during the day, like birds. By being active at night, they avoid these predators.
* Food availability: Their primary food source, which is nectar from flowers, is more readily available at night.
* Reproduction: The moths use their sense of smell to find mates, which is more effective at night when there are fewer competing smells.
So, while peppered moths rest during the day, it's not a "sleep" in the same way we think of it, but rather a period of inactivity to stay safe and avoid predators.