Caffeine can act as a stimulant to the body and mind making it harder for a person to fall asleep especially when taken close to bedtime.