The Internet of Things (IoT) paradigm comprises a heterogenous mix of connected devices connected to the Internet. This promises a a wealth of opportunity for a large collection of distributed applications and services. However, the IoT introduces significant changes to the Internet model, largely in the form of billions to trillions of embedded devices that most likely will not be able to be managed centrally by cloud services due to lack of scalability. We suggest that the natural direction for IoT devices is to manage themselves, both in terms of their software/hardware configuration and their resource utilization. In this work, we describe the underlying framework for self-managing devices, comprising measurement-based learning and adaptation to changing system context and application demands. In addition, we describe several upcoming research challenges in order to realize this self-management vision.