Apple’s optimized battery charging learns your usage routines and only works if these are regularly met. If, for example, your alarm changes, the optimized charging won’t work.