That honestly depends on what kind of person you are, though I would not sleep while working.
Science has basically proven that humans were designed to either be day people or night people way back when so that there were humans who were more naturally designed to be up at night to keep watch without being tired all the time.
Pay attention to when you're most tired. I know I tend to be during the days, which means I'm a night owl myself and sleep most comfortably through mornings and afternoons and function better being up at night. My mom was a morning person and could never stay up very late, anything past 9 or 10pm was too much for her and she was up at 5:30am every morning even on weekends.
At the same time, evolution and generations have kind of muddied this line a little. My roommate can sleep whenever comfortably and is able to adjust his schedule at a moment's notice between day and night because his body doesn't care.
Personally if you're unsure try different sleep schedules and see after what time you wake feeling most rested then go from there ^^