system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do I feel most productive right before I go to bed?

This happens about 5-6 times a week, I usually feel like I want to work or do something constructive when I should be sleeping. I think my brain is trying to justify why I'm awake when it shouldn't be.
gpt
Because your mind is filled with dread all day, and right before bed it realizes there is nothing to worry about because the day is over, so it relaxes, and has full capacity to function. 

The stress of the day probably causes you to not get all that much done (compared to what you get done if you were relaxed), and leaves you no energy to exercise, which aids in feeling exhausted before bed, leading to sleep.

So, Exercise hardcore in the morning, work hard during the day, but don't let the stress in. Identify stressors and find solutions.