I use to suffer from it extremely bad. I found out that I'm super sensitive to caffeine. Like real bad. If I was to have a coke at lunch today I won't sleep. If I ate a piece of chocolate cake at dinner I won't sleep.
I have one cup of coffee first thing in the morning and that's it. I'll only drink caffeine free soda and will watch out when it comes to chocolate and other foods that contain the stuff.
Now I sleep really good.
(the 2-3 rum and cokes I have at night probably help too

)