The dynamic and unpredictable nature of energy harvesting sources that are used in wireless sensor networks necessitates the need for adaptive duty cycling techniques. Such adaptive control allows sensor nodes to achieve energy-neutrality, whereby both energy supply and demand are balanced. This paper proposes a framework enabling an adaptive duty cycling scheme for sensor networks that takes into account the operating duty cycle of the node, and application-level QoS requirements. We model the system as a Continuous Time Markov Chain (CTMC), and derive analytical expressions for key QoS metrics - such as latency, loss probability and power consumption. We then formulate and solve the optimal operating duty cycle as a non-linear optimization problem, using latency and loss probability as the constraints. Simulation results show that a Markovian duty cycling scheme can outperform periodic duty cycling schemes.