I became a morning person in recent years; this is when I take care of the tasks that require the most effort. But I cannot make this happen always; I need to be flexible. Not being able to stick to your habit can feel devastating (what about my streak?). If you want to avoid being hunted in your dreams by the green owl of Duolingo, this advice might be helpful for you.
There is research showing that people more consistently stick to their habits if they formulate them in a challenging but flexible way, e.g., "I will go to the gym at least 5 times a week" versus "I will go to the gym every day of a week." By including some leeway, you anticipate life. The same holds for temporal/spatial flexibility: if your habit is time-/location-dependent, you can become dependent on that.
Habits are useful to start learning something new, getting more exercise, or spending more time with friends. It spares you the mental overhead. You do not need to think about what you will do; you just do it. But it can get too much: you need to trade off the friction-reducing effect and the autopilot mode of being governed by your habit. You know better than not to join your friends for dinner, even when you still need to hit your daily step count, don't you?