We analyze the performance of IEEE 802.15.4 MAC with superframe structure including the inactive period where each device is in non-saturated conditions. The superframe structure with a inactive period has the following two primary characterizations: (i) deferment of packet transmission until the following active period due to insufficient backoff slots for completing the packet transmission, (ii) high competition in the head part of the active period due to packets which were deferred from the previous active period and were arrived during the previous inactive period. These characterizations complicate the construction of a mathematical model of MAC with the superframe structure including a inactive period. In this paper, we construct a discrete time Markov chain (DTMC) model which takes into account these characterizations. By analyzing the DTMC, we obtain the main performance measures such as throughput, packet delay distribution, packet loss probability and energy consumptions of devices and the PAN coordinator. We demonstrate high accuracy of the proposed model by comparing the numerical results with simulation results. Finally, we optimize the lengths of the beacon interval and the active period to maximize the battery life of devices while satisfying quality-of-service (QoS) constraints on packet delay and packet loss probability.