Having trouble falling or staying asleep is known medically as insomnia, and it can last anywhere from a single night to weeks or even months. Insomnia affects more than one-third of the population.

Insomnia can be quickly remedied by following a few simple steps. This, however, is dependent on the root cause of your sleeplessness. To be safe, it's best to talk to your doctor about how to handle your insomnia if you know you have a medical condition that could be contributing. To find out if these methods work for you, try them out at home.

1. Go to bed and get up at the same time every day. To get the most out of your sleep schedule, set an alarm for the same time every day so that your body gets used to the routine. To get the best results, you must adhere to it even on days off and weekends.

2. Engage in some vigorous physical activity on a regular basis. Being physically active and getting regular exercise is an excellent way to help you fall asleep and stay asleep at regular times throughout the night. However, engaging in strenuous physical activity just before bed can make it more difficult to relax and drift off to sleep.

3. Avoid stimulants in the evenings. To stay alert and awake for a few hours after a caffeine-containing beverage, such as coffee, has become common practice for many people. Caffeine's effect lasts for several hours, so if you drink it within 3-4 hours of going to bed, you may have trouble falling asleep.

4. Make sure you aren't napping all the time. Taking a short afternoon nap (no more than 30 minutes) is fine. Taking frequent naps causes sleep disturbances because it alters the body's natural cycle.

5. Only use your bed for sleeping and having sex. If you have to stay awake or alert, avoid doing these activities in bed and find other places to relax instead. Get rid of the television in your room and stop budgeting on your mattress.

6. Before going to bed, avoid being exposed to blue light. One hour before going to bed, turn off all blue-light emitting electronics like televisions and smartphones. The use of digital screens before going to bed can make it difficult to get a good night's sleep.

7. Do not eat dinner too close to when you plan to retire for the night. Make a conscious effort to eat dinner at least three hours before going to bed. Eating late at night can wake you up because it stimulates your digestive system.