Performance of a delay-tolerant network has strong dependence on the nodes participating in data transportation. Such networks often face several resource constraints especially related to energy. Energy is consumed not only in data transmission, but also in listening and in several signaling activities. On one hand these activities enhance the system's performance while on the other hand, they consume a significant amount of energy even when they do not involve actual node transmission. Accordingly, in order to use energy efficiently, one may have to limit not only the amount of transmissions, but also the amount of nodes that are active at each time. Therefore, we study two coupled problems: 1) the activation problem that determines when a mobile will turn on in order to receive packets; and 2) the problem of regulating the beaconing. We derive optimal energy management strategies by formulating the problem as an optimal control one, which we then explicitly solve. We also validate our findings through extensive simulations that are based on contact traces.