Trouble sleeping could come from anything be related to a number of things – what you eat, eating before bed, stress, acid reflux, too much on your mind. Too much caffeine may affect sleep habits as well.
If you eat too close to bedtime, it can cause acid reflux because there hasn’t been enough time to digest the food you’ve eaten. Some foods like tomato sauce and chocolate give trouble too since they are so acidic.
If you must eat at night, maybe try some oatmeal or something else that is bland and fulfilling.