Write down your activity for two weeks: what you eat, what you do, where you go. Track your sleep during this time as well. At the end, look at all the data for patterns. Cup of coffee after 1pm? Eating after 7pm? Looking at screens after 9pm? Any of these could be part of the problem. Combine that with the possibility that diet and lack of exercise may be in part to blame also. If you can’t find patterns and correlation yourself, take the data to your primary doctor and see what he says.