Capital assets are typically maintained by replacing components with spare parts. Often, there is flexibility to delay planned, preventive maintenance when spare parts are required to perform more urgent unplanned, corrective maintenance. In this case, keeping a single stock of inventory to satisfy both types of demand can be beneficial. Therefore, we study a periodic review inventory system with a single stocking point and a zero replenishment lead time, used to meet lower-priority demands that are planned, as well as stochastic, high-priority demands. We study the impact of flexibility in performing planned maintenance on the optimal inventory policy. When planned maintenance may be delayed at most once, i.e., for one period, a myopic policy is optimal. When it may be delayed to the next period for an unlimited number of times, we characterize the structure of the optimal policy. We further propose two extensions, one in which delayed planned maintenance may become unplanned and one in which the total maintenance delay costs are increasing and convex in the number of delayed maintenance actions. Numerically, we find that allowing a single delay provides a system performance very close to that when unlimited delays are allowed. This result becomes even stronger in the context of the two model extensions. These results are important for practice, since maintenance managers are unlikely to accept the unlimited delay policy, while the one delay policy is likely to be more acceptable. Finally, we develop myopic heuristic policies and demonstrate that they perform quite close to optimal.