Dear OP,
I do think you are doing your best. I admire your patience and determination to help your child.
I have a child who hated school starting year 1. It took so much just to make her go there. Daily sickness complaints before school, whining, crying, anxiety...it was a lot for all of us to deal with.
DD never wanted to elaborate on why she hates school. After many years she told me that kids used to call her fat and ugly (she was neither), and some teachers were discouraging.
Coming from a loving and supportive home environment, nasty comments from the children and teachers’ lack of support/care, her little spirit was completely broken and self esteem non-existant.
When she finished her GCSEs I could not bare to force her to go to school anymore. She took a gap year, worked at a cafe and then on her own decided to go back to school. I went with her for an orientation, she was visibly shaking, but she did go through with signing up.
She was horrified after submitting her first assignment...she did her best, went above and beyond and was terrified to fail. Ofc she did not fail, she did well and got good feedback. Good feedback was like a fuel to her and she continued going above and beyond for each assignment. She has received some constructive criticism as well which she took to heart and used to improve herself.
The point to my story is that things can get better. I think your son seems to be hurting (I think it is school related and related to how the school environment makes him feel). I think it has little to do with his sleep or 1 hour ipad use. I agree with posters who suggested some positive feedback/encouragement may help as well as getting assessed for certain conditions, at least to rule them out.
Good luck with everything OP💐