When flying from Koh Samui to Morocco, the time of day you decide to fly out makes little to no difference towards the overall price you’ll pay on tickets.
For a flight from Koh Samui to Morocco, you will be flying from Ko Samui. Ko Samui (USM) is just 3.3 km from the centre of the city.