How to get quality sleep as a web developer

How to get quality sleep as a Web Developer in 2022

Hi folks, hope you are enjoying your day and coding journey.

In 2016, when I started to learn code. At that time I don’t have any understanding of productivity, quality sleep benefits, active work life, and how to perform best in our work.

I wake up late morning with lots of laziness and itchiness in my eyes. Not getting what the instructor was explaining about HTML CSS and Web development.

Lazy mornings
image credit

After spending 2-3 hours at coding classes I go for my part-time job as a helper in a woman’s accessories store which is a small store with 2 employees. Completing 7 hours of job I reach my home and get some evening snacks.

And again I open my laptop to learn and revise what I have learned about web development in my classes like HTML tags, CSS properties, etc

W3School was very famous at that time 🙂 so mainly use it to learn and understand web development more than class notes.

Efforts to learn web development
image credit

This is how my life is going, but I was not satisfied with my efforts and progress to learn web development. All-day is very frustrating and I feel very sad or looser when I don’t understand the behavior and methods of CSS.

After googling and consulting with doctors, I found all this is happening because of my bad quality of sleep.

Do you know what are the side effects of bad quality sleep and how it is affecting our brain?

side effects of bad quality sleep

– Lake of concentration
– Body pain
– Irritability
– Stiffness
– Headache
– Poor digestion
The list keeps going, but I think you get the point.

These improper sleep side effects will ruin your productivity level.

I have spent nights watching YouTube video tutorials and udemy courses to learn web development. Nowadays you can see more than 90 small and big articles of web development on my profile and personal website because hard work pays off.

But now I realize that proper sleep is very essential for every human mainly for those who spend more than 6 to 8 hours in front of the computer screen and late-night parties.

late night study and party effect on sleep
image credit

Nowadays people are not able to get proper sleep because they don’t give priority to their sleep. But we have to memories our self that getting better sleep is also important like eating and breathing.

Now I am going to share with you some best quality sleep ideas which I have used to shape my productive day. I have learned these sleeping skills from different sources like monks(Nick Keomahavong), books, videos, etc

Lessons to get quality sleep

Perfect sleep hour

Perfect sleep hour
image credit

Create a habit to sleep at the same time every day. I know it’s not easy but you have to do that for quality sleep. Complete your all work/task in day time but try to go to a bedroom to sleep at the same time.

Sleeping area

sleeping area
image credit

Differentiate your sleeping area. Use bed or bedroom only for sleep, some people use their bed for reading, eating, playing, etc. If you don’t have enough space to separate your places then switch your bed to yoga mate. It will give you much relaxation and quality sleep. When you enter your separate bedroom it will give you a command to your brain “Now you are in a sleeping area”. And you automatically feel now you want peace & sleep, this is the power of the sleeping area.

Start your day with discipline

sleeping carpet
image credit

Yes, the discipline also plays a vital role in your quality sleep. Because if you wake up early in the morning and without making your bed you take your breakfast and again you come to your bedroom you will feel the unsolved or messy environment in your bedroom which will affect your sleep. Your outer environment will impact your inner thoughts. In the entire day, you have a pending task in your mind to make your bed. Either if you start your day by making your bed you will feel you have completed your first task of the day very easily. So start your disciplined day by making your bed.

Luxury level for sleep

WordPress Developer luxury bed atulcodex
image credit

Don’t sleep on a much comfortable and luxurious bed. I know this point is a little funny. But it’s true. Let me explain to you how, if you sleep on comfortable or soft beds in the early morning when you try to wake up you will feel much laziness in your body. Laziness is the biggest enemy of a human. This is the reason why monks use flat yoga mates on floors to get quality sleep. In studies, doctors found that hard beds solve back pain problems. As web developers or normal humans, we can adapt these monk habits to improve our lives.

Recall your good memories

Recall your good memories
image credit

Recall good memories while going to sleep. It will give you inner peace and relaxation to your soul and will help you to get better sleep. Happiness works like medicine for our human soul. Try it by making a small smile on your face. Try it 🙂

Blink your eyes

eye blinking while working
GIF credit

Blink your eyes multiple times while working on a computer screen or smartphone. It will reduce your eye pressure and your eyes will be fresh most of the time.

Blue light protection

Blue light protection glass
image credit

Wear a blue light protection glass while working on a computer. As a developer, we spend most of our time with computers blue screens. Blue lights are very harmful to our eyes, It cause problems like blurry vision, eyestrain, dry eyes, etc. I am using blue light protection glasses for the last 2years almost, which I have bought from amazon just before the pandemic.

Roller coaster journey to learn CSS responsive layout course by Kevin Powell

Blue light gadgets use

image credit

Blue light has major side effects on our quality of sleep. In the previous lessons, we have seen that blue light has loads of eye side problems. As web developers or tech-savvy guys, we can’t stop using these gadgets entirely. But I have discovered a middle way for this issue. After a few days of the experiment, I have found that if we will stop using blue screen gadgets(smartphone, laptop, TV, etc) 2 hours before going to sleep then it will not affect our quality of sleep. I have tried this for 2 months consistently and the results are very impressive.

Benefits of sleep?

benefits of sleep

sleep has many benefits which are as follows
1. better memory
2. muscle development
3. tissue repair
4. Production of hormones
5. Control hormones
and many more

Benefits of Sleep for college students?

WordPress Developer benefits of sleep for collage students atulcodex

Better and quality sleep increases your memory power to store or remember things properly which is very important for any student.

Benefits of sleep for a web developer?

WordPress Developer Benefits of sleep for a web developer atulcodex

Sleep has many benefits on the human body whether you are a web developer or any other professional. Quality sleep will increase your memory power, better thinking level, better productivity, etc. sleep has many benefits.

Is it healthy to sleep without a pillow?

Is it healthy to sleep without a pillow

Actually, it depends on many factors like the height of your pillow and your sleeping position. According to my experience use medium size pillow and a straight sleep position for a healthy spinal cord, neck and shoulders.

Benefits of sleeping on the floor?

Benefits of sleeping on the floor

Sleeping on the floor will solve your health problem. Regularly sleeping on the floor will solve your shoulder pain, neck pain, body postures, back pain problems.

What happens if we never sleep?

What will happens if we never sleep?

If never sleep then the next day will be your worst day ever. You will feel tired and irritable. If you try for more than 2 nights will badly affect your health like insomnia, obesity, heart diseases, diabetes, skin issue, etc

Is there any way to fall asleep fast

Is there any way to fall asleep fast

Yes, try this way to fall asleep fast.
Take a 4-second deep breath.
Hold that breath for 7 seconds.
release your breath slowly in 8 seconds.
after doing this 3-4 times before going to bed, it will increase the relaxation level in your body and you will fall asleep.


Ok, now completing this detailed guide about quality sleep, the importance of sleep and how to get quality sleep as a web developer or any other professional, hope you understand the priority of sleep in our life. On the top of this blog, you see that I have struggled a lot to find ways of getting quality sleep.

At this point in my life, I work as a full-time web developer at a startup company and one of my colleagues have shared his productivity problem with me. At that time I realized that I have to share these ideas with our entire developer community so anyone will never lose their productivity. So try to share these valuable ideas with others and ask me if you have any other questions regarding quality sleep in the comment section. I would love to help you.


Working as a full-time WordPress CMS Developer, learning core languages like HTML, CSS and JavaScript. Started learning web development in 2016 interested in backend development learned PHP very well got a job as a PHP Developer and fired in one week 🙂 Again got a job as a WordPress CMS Developer. Learned JavaScript 4 times yet not understand properly. Now started learning Web Development again from scratch, sharing my journey and knowledge in the form of blog articles. I’m on a mission to learn and share daily.

This Post Has 2 Comments

  1. Skilltology

    It is very helpful for developers and developing language.

    1. atulcodex

      Yes it is, Is there any problems faced by you related to sleep?

Leave a Reply