Cross-layer optimization aims at improving the performance of network users operating in a time-varying, error-prone wireless environment. However, current solutions often rely on ad-hoc optimization approaches, which ignore the different environmental dynamics experienced at various layers by a user and violate the layered network architecture of the protocol stack. This paper presents a new theoretic framework in which the cross-layer optimization problem is formulated as a layered Markov decision process (MDP). In this framework, each layer adapts its own protocol parameters and exchanges information (messages) with other layers in order to cooperatively maximize the performance of the wireless user. Hence, this layered crosslayer framework does not change the current layered architecture and is suitable for the delay-sensitive applications over wireless networks.