In the process of ocean exploration, highly accurate and sensitive measurements of seawater temperature and pressure significantly impact the study of seawater’s physical, chemical, and biological processes. In this paper, three different package structures, V-shape, square-shape, and semicircle-shape, are designed and fabricated, and an optical microfiber coupler combined Sagnac loop (OMCSL) is encapsulated in these structures with polydimethylsiloxane (PDMS). Then, the temperature and pressure response characteristics of the OMCSL, under different package structures, are analyzed by simulation and experiment. The experimental results show that structural change hardly affects temperature sensitivity, and square-shape has the highest pressure sensitivity. In addition, with an input error of 1% F.S., temperature and pressure errors were calculated, which shows that a semicircle-shape structure can increase the angle between lines in the sensitivity matrix method (SMM), and reduce the effect of the input error, thus optimizing the ill-conditioned matrix. Finally, this paper shows that using the machine learning method (MLM) effectively improves demodulation accuracy. In conclusion, this paper proposes to optimize the ill-conditioned matrix problem in SMM demodulation by improving sensitivity with structural optimization, which essentially explains the cause of the large errors for multiparameter cross-sensitivity. In addition, this paper proposes to use the MLM to solve the problem of large errors in the SMM, which provides a new method to solve the problem of the ill-conditioned matrix in SMM demodulation. These have practical implications for engineering an all-optical sensor that can be used for detection in the ocean environment.