Macros macros macros. You need to know EXACTLY the carb and protein and calorie numbers for all the foods you eat. If you "wing it", it's like trying to guess how to get to New York from Los Angeles by road. You will get there eventually by just travelling east, but having a map will greatly refine your route. This link leads to a chart which gives the nutrient macros for most of the foods you eat. If it is not on there, find it elsewhere and make your own chart:
http://www.weightcruncher.com/carb-chart.html
I am fond of broccoli and cauliflower anyway, and they are both very low carb. I know that if I make a dish with them, I can calculate the carbs by simply multiplying them by my portion amounts (also measured). I know that by just adding a half cup of corn, I will double the carbs. I love bananas and grapes, but they are high in sugars (carbs). Also important is the Glycemic response (the impact on blood sugar over a period of time after consuming carbs). A high GI is not good, and even though the body feels briefly energized and satiated, it comes with a crash when that simple sugar is metabolised and turned into fat.
The University of Sydney maintains a searchable Glycemic Index database for foods here:
http://www.glycemicindex.com/
You want low GI foods to deal with that insomnia. High GI foods impact blood sugar and metabolism and sleep patterns and overall energy levels. I think the biggest tragedy of many would-be "healthy eaters" is smoothies. Made with berries, cream and greek yogurt and perhaps apricots or pears, you have a winner. But I see pineapple, bananas, watermelon, grapes, and some even add some agave nectar which is just more sugar. Smoothies made with these high GI/High carb fruits can wreck your diet and your metabolism.