I find it helps to stick to an office-like routine even when you don't really need to. Like do actually wake up on time, take a shower, perform normal grooming tasks, get dressed in professional clothes, make breakfast, and get online on time.
also go outside for a short walk to simulate the daily commute.