The occasional night of poor sleep is normal. If it goes on for months, see a doctor.
Things that keep me from sleeping well are
Caffeine - especially after about 2 PM
Deadlifts the next day - its like christmas morning!
Heavy doses of carbs
Anastas Dimitar Martin