Get up. Get out. Get moving.
When you're working from home, it's easy to be lazy. And it should be – it's your home for crying out loud! But same distractions that make it a comfortable place to relax after work are productivity killers.
Find a co-working space or a good coffee shop that doesn't mind you hanging out for a couple hours hooked up to their wifi. Get out and be around other people, even if you don't talk to them.
Get a bike or walk there. The exercise will help you get and stay alert.
And accept that if you were in an office, you'd be taking trips to the bathroom and chatting with people at the coffee machine during the day, and those little breaks are just as important when you're working remotely.