We've all been there at 3am, cursing ourselves for that fifth cup of coffee.
It's an obvious mistake to make, but there may be other elements of your diet keeping you up at night.
Here's a brief breakdown of what and what not to munch before hitting the hay.
The dream team, literally.
A 2007 study in the American Journal of Clinical Nutrition found that consuming jasmine rice four hours before sleep reduced the amount of time taken to succumb by half.
This is due to its high ranking on the glycemic index - it releases glucose slowly into the bloodstream as the body digests it.
Soy beans and Pumpkin seeds
These foods, alongside Turkey, contain high levels of tryptophan, which has been found to promote sleep in studies.
Cherries are one of the few natural sources of melatonin, a hormone often recommended as a sleep aid, according to a study published by the Journal of Experimental Botany in 2011.
A 2014 study also found that drinking tart cherry juice twice a day for two weeks helped older adults with insomnia increase sleep time by nearly 90 minutes.
BananasPicture: Richard Whiting /Getty Images
A good source of magnesium and potassium, Bananas help relax muscles and also contain tryptophan, which helps promote sleep.
Oatmeal is rich in calcium, magnesium, phosphorus, silicon and potassium, all of which can aid sleep - just don't add too much sugar to it.
Decaffeinated green tea
Green tea contains theanine, which helps promote sleep - just make sure you don't buy the caffeinated type otherwise you won't get the desired effect.
In fact the exact opposite.
Best to avoid these before bed.
CaffeinePicture: Justin Sullivan/Getty Images
It seems obvious, but stay away from energy drinks, coffee and all other caffeinated culprits if you want a restful night.
Caffeine is a central nervous system stimulant and acts to prevent drowsiness, and is often found in coffee, tea, soft drinks, energy drinks and products containing chocolate.
You may think that a glass or two of wine will help you get to sleep.
You're right - in that alcohol could make you drowsy - but it will also affect the quality of your sleep.
As, Dr John Shneerson, head of the sleep centre at Papworth Hospital in Cambridge says, when the alcohol starts to wear off you can be raised out of a deep sleep into rapid eye movement sleep, which is much easier to wake from.
You're more likely to be woken and you're also less likely to benefit from the restorative properties of deep sleep. You're also more likely to wake up needing the toilet.
Spicy foods can cause indigestion before bed, and can keep you awake at night.
An Australian study of young men found that those who poured on spices had less deep sleep and more trouble achieving it than men consuming non-spicy meals.
A greasy burger will make you feel heavy and drowsy to begin with, but this type of food can affect your quality of sleep.
Research has suggested that heavy, fatty meals are linked with fewer hours of sleep and they can also cause acid reflux or indigestion - something you don't want to be up all night with.