How well you sleep can often depend on what you eat and what you do in your wakeful hours because certain foods and certain behaviours can very much interfere with your ability to sleep.
The easiest way to discover anything that might be keeping you awake is to keep a diary recording what you eat, how much you exercise and what you do during the day and evening. Once these are recorded, any association between sleep, food, exercise and behaviours can be seen. These associations may be good or bad - it doesn't matter. The important thing is that once you see a pattern emerging you can do something about it. For example, if it becomes obvious that on the days that you exercise you fall asleep more quickly and have much sounder sleep you can turn this to your advantage and make sure you include some exercise every day. On the other hand we may see an association between eating a big meal at night and difficulty falling asleep, so we can immediately choose to change our pattern of eating.