It really depends. Sometimes it's actually more productive to just rest, or if it's because of a specific issue then fix that. I don't struggle with being productive in general, but if you're not legitimately tired or having symptoms of physical or mental health issues, then the best thing to do is set up an environment where it's more costly to be unproductive than being productive. Put your phone or other distractions away so you can't see or reach them.