Almost 50 percent of Americans say that restless or minimal sleep is a regular occurrence in their lives. Sleep deprivation is a serious issue, and it can disrupt your body chemistry and your ability to function properly.

If you’re suffering from insomnia, here are a few habits that might be causing the problem.

1. Drinking caffeine.

Caffeine is obviously used as a stimulant to keep you alert and awake. However, most people aren’t aware that drinking a single latte can affect your system up to 12 hours later. Next time you hit an afternoon slump and debate grabbing a coffee, you should remember that you could be setting yourself up for a restless night. 

There are ways to get through the day without succumbing to caffeine. Instead of going for a coffee or tea, try getting up and moving around or stretch. If you work in an office, try to take a quick break outside and soak up a little sun, or simply switch tasks for a while to get your brain focusing on something new.

2. Taking allergy pills.

If you suffer from allergies, falling asleep can sometimes seem impossible, since a stuffed-up nose and itchy eyes aren’t exactly conducive to good sleep. Medication is often an essential component of allergy management, but some medications could actually be the source of your sleep troubles.

Many decongestants contain pseudoephedrine, a drug that will keep you feeling awake, so you should avoid these substances near your bedtime. If you’re really suffering, be sure to pick out a medicine that is made specifically for nighttime use.

3. Late night snacking.

Late night food cravings are common but can have dire consequences. When you binge eat late at night, the extra food can disrupt your metabolism. In a medical study using mice, researchers found that consuming high-fat foods throughout the day, including late-night meals, can lead to insomnia and other health issues. One group of mice in the study were allowed to eat at all hours of the day, while a second group could only eat during an eight-hour window. Alice G. Walton wrote of this study in the Atlantic:

“Both of the high-fat groups ate the same amount of calories. But the mice who had eaten high-fat diets round the clock had a number of health problems, including weight gain, high cholesterol, high blood sugar, liver damage, and even motor problems when put to an exercise challenge.”

4. Reading your phone.

Nowadays, we live with our smartphones and computers. Given our incredible access to technology and information, we often forget that our brains could use a break from staring into the black mirror abyss. Limiting your screen time can greatly improve your sleep habits according to a number of recent studies linking exposure to LED screens to sleep disorders.

Set up boundaries with your phone, especially at night. Be sure to turn off any audible notifications so that you aren’t tempted to check your email or text messages. You should also be slowly stepping down your screen time starting at least one hour before you try to go to sleep. This gives your body a chance to prepare for a successful night of rest.