My son has trouble alot like that. What he does is stays up all day, then all night, then all the next day. He goes outside and does some physical activity, then when night falls, he gets a warm bath and goes to bed, after telling me what time to wake him the next morning. I wake him up ( not always easy after that amount of time awake) then he is on a pretty good schedule for a while.
Hope that helped.