If you have ever found yourself feeling a little grouchy after a bad night’s sleep, know you’re not alone. There are several studies that have demonstrated the connection between the amount of sleep you get and your quality of mood. They show us that there’s more to a good night’s sleep than simply having energy for the day ahead; it’s about feeling happy, too.

We are incredibly sensitive to changes in our sleep patterns. A striking example is the sudden increase in road accidents in the days following Daylight Savings Time. Even a small amount of time lost at night affects us, and adults with lower mental health tend to sleep less than others.

On average, an adult should be getting between 6-8 hours of sleep a night depending on their personal needs. During this time the body and mind repair themselves. If this rest is interrupted, you will find yourself making compromises throughout the day, as well as becoming more quickly stressed.

Being more susceptible to stress impacts all areas of life. Your work becomes harder and tends to overwhelm you much faster, and personal relationships can be quickly strained. Sleep deprivation has also been linked to weight gain and obesity. There is even an increased risk for strokes and diabetes.

Low-quality sleep or deprivation affects the entire family. In children, getting enough rest is key to their development as it allows them to learn how to process emotions without getting overwhelmed. Tired children also don’t perform as well in school, with 81% of parents confirming that their children’s educational performances were affected by their lack of sleep at some time in their school life. If you, as a parent, are not sleeping enough, it can affect your relationship with your child; with over half of parents admitting that they have been short with their children when they’re tired.

It’s clear that the irritability that sleep deprivation leaves you with can cause all sorts of issues. This doesn’t stop at your children, either—being easily irritated means tension is high with anyone that you interact with, which could start causing issues with your partner if you’re continuously suffering from a lack of sleep.

So how can you help improve your sleep and improve your happiness? We might not realize how our sleep is being affected until we examine our routine and environment.

A common reason that we suffer from a bad night’s sleep is down to our mattress, often because it’s not the right one for our needs. The best mattress for you depends on your sleep needs, but there are a staggering amount of people that sleep on a mattress that isn’t comfortable or suited to their sleeping position.

In recent years, mattress technology has developed greatly and, leaving the traditional innerspring mattress design behind, hybrid mattresses are becoming increasingly popular. The best hybrid mattress offers the support of a traditional innerspring mattress but with the pressure relief of memory foam layers.

Other environmental factors, such as heat, sound, and light, may have more of an effect on our rest than we realize. While it may be more pleasant to have a well-lit room during the day, allowing light into our rooms at night decreases our quality of sleep. This is a particularly big issue in cities. Many people who live in urban areas find it difficult to block out the street lights and, over time, this can easily disrupt a sleep cycle. The noise pollution of an urban area is also an issue.

This is why, in urban areas particularly, it is important that we make an effort to consider our sleep. We are surrounded by more harmful environmental factors. Furthermore, city living tends to be associated with a faster pace of life. Our schedules are more full and more time is spent online or looking at screens.

When faced with long working hours, social events, and our favorite TV shows, sleep is often the first compromise we make. We may not feel it in the short term but, over time, this compromise will lead to serious issues, as the previous research demonstrates.

Additionally, the blue light emitted from screens is harmful for our sleep. Our body reacts to such light in the same way it does to the sun. We stay awake looking at our phones and computers because our bodies believe it to be daytime, which can become detrimental to our routines very quickly.

As could be expected, the alternative is also true, and it has been shown that your quality of sleep improves with your happiness. Resting well keeps you happy and being happy helps you rest. Interestingly, however, the study describes that those who find their positive emotions are more affected by external events are increasingly likely to have their sleeping disrupted.

While your happiness doesn’t always feel like it’s within your control, the amount you sleep is. Giving your rest the consideration it deserves is fundamental to improving your wellbeing. And, since happiness and sleep go hand-in-hand, they will help to sustain each other, leading to a better quality of life.