For much of my life, I longed to be a morning person. I dreamed of being productive in the wee, dark hours of the morning, accomplishing more before the sun came up than most would do in a whole day.

As a result, I went through cycles of fighting my natural rhythm. I would wake up at 5:30 a.m. and go out for a brisk run, make myself a healthy breakfast, and get ahead on the day’s work. These days made me feel like a rockstar, but they also left me drained. I was still unable to settle down early in the evenings and would soon become sleep deprived. My early riser routine would last a week at best before I returned to my natural night owl tendencies.

I wondered why it was that I couldn’t seem to reset my biological rhythm when I was following every piece of advice I could find. I was working out first thing in the morning. I was drinking lemon water and getting plenty of light in my face when I woke up. I forced myself into bed when I wasn’t tired. Yet, by midday, I was struggling to keep my eyes open, and when the sun went down my mind woke up, making it difficult to adhere to my early bedtime.

It turns out, I may be out of luck when it comes to being a bright-eyed and bushy-tailed morning person. Extreme morningness or eveningness is genetically predetermined, making it incredibly difficult for a night owl to convert to a lark or vice versa. While there are a number of genes at play when it comes to determining the way your biological “clock” is wound, the Period 3 gene in particular dictates up to 52 percent of a person’s morning or evening preference. You can fight it all you want, but ultimately, your body’s rhythm is already decided for you.

However, not all hope is lost on night owls wanting to conform to a world that seems set up for the success of larks. According to Dr. Adrian Williams, a professor of sleep medicine at King’s College in London, even though genetics determine the bulk of our sleep patterns, there are still ways we can make changes to our circadian rhythm.

“There is a clear environmental effect,” Williams says. “So yes, we can manipulate our rhythm.” He notes that in his research he found that urban living promotes eveningness because of the evening light exposure while rural living does the opposite with more exposure to natural light in the day.

Luckily you don’t necessarily need to uproot your life to move into the country for better sleep habits. Williams suggests for night owls who want to increase control over their rhythm to develop a more mindful routine in the evening hours by limiting light exposure, especially blue light (so if you’re reading this on your iPhone at midnight, you may want to step away from the screen for sleep’s sake). Melatonin can also be useful in developing a new sleep pattern.

You can also bank on gradually becoming more of a morning person as you age. The hormonal changes throughout your lifespan bring you to peak eveningness in late adolescence, while morningness increases with age. So night owls, take heart—someday 6 a.m. may not seem like such an ungodly hour after all.