Q&A: I'm a programmer who writes code at night. Now I either can't fall asleep or have problems waking in the morning. Is this normal? I'm 17.
Hi, in general what you are describing is not a good sign. These occurrences are your body telling you that things need to change, and there can be serious long term consequences to not giving the proper attention to your body’s sleep needs. Do what you can to change your programming schedule. Studies have shown even small amounts of light (like that from a computer screen, or even on/off lights on appliances), at night, can have a real negative impact on your sleep quality. Read this article  for more information on how this works.
The sooner you can get to a more regular sleep schedule, while protecting the quality and quantity of your sleep hours (aka - sleep hygiene), the sooner you can have the better state of mind and body you want during the day.
Nutrition is also a key factor in getting better sleep that is often under-estimated. Be mindful of the quality of food you consume, limit sugary drinks or alcohol, etc. This will also help you get better quality sleep and feel better during the day, whatever time you choose to go to bed.
 Q&A: Why Is Blue Light before Bedtime Bad for Sleep?
Original Answer on Quora
James L Poole
I am a holistic health therapist: Emmett Technique practitioner, aromatherapist, nutritional therapist, and Reiki healer. This is my blog about natural healing.