In cognitive radio (CR) networks, cooperative relaying is emerging as a key technology to improve the performance of secondary users (SUs), while ensuring the quality of service of primary transmissions. Most previous work in CR relay networks concentrates on maximizing physical layer data rate as a design criterion. However, the end-to-end Transmission Control Protocol (TCP) performance perceived by SUs is largely ignored. In this paper, we take a cross-layer approach to jointly consider best-relay selection, power allocation, adaptive modulation and coding and data-link layer frame size to maximize the TCP throughput over CR relay networks based on the underlay paradigm, while guaranteeing that the primary link is provided with a minimum-rate for a certain percentage of time. Specifically, we formulate the CR relay network as a restless bandit system. The objective is to maximize TCP throughput as well as prolong network lifetime. Simulation results are presented to demonstrate the effectiveness of the proposed scheme.