In this paper, we propose an optimal Bayesian control policy with two sampling intervals minimizing the long-run expected average maintenance cost per unit time for a partially observable deteriorating system. Unlike the previous optimal Bayesian approaches which used periodic sampling models with equidistant intervals, a novel sampling methodology is proposed which is characterized by two sampling intervals and two control thresholds. The deterioration process is modeled as a 3-state continuous time hidden-Markov process with two unobservable operating-states and an observable failure state. At each sampling epoch, the multivariate observation data provides only partial information about the actual state of the system. We start observing the system with a longer sampling interval. If the posterior probability that the system is in the warning state exceeds a warning limit, observations are taken more frequently, i.e., the sampling interval changes to a shorter one, and if the posterior probability exceeds a maintenance limit, the full inspection is performed, followed possibly by preventive maintenance. We formulate the maintenance control problem in a partially observable Markov decision process (POMDP) framework to find the two optimal control limits and two sampling intervals. Also, the mean residual life (MRL) of the system is calculated as a function of the posterior probability. A numerical example is provided and comparison of the proposed scheme with several alternative sampling and maintenance control strategies is carried out.