Corporate Jet Pilot reported failure to enter correct altitude information resulted in crossing restriction overshoot on departure.
Synopsis
Corporate Jet Pilot reported failure to enter correct altitude information resulted in crossing restriction overshoot on departure.
Narrative
Cleared for takeoff; initial climb to the usual 5000 ft. which is set in the altitude alerter is all normal. Cleared to 8000 ft. and to climb on the SID before I reach 5000 ft. and before I reach ZZZZ. This means I have to comply with the crossing restriction of 5000 ft. at ZZZZ before continuing up to 8000 ft.For some reason I put in 8000 ft. in the altitude alerter and realized just after crossing ZZZZ that we are at 5150 ft. and climbing fast. Not wanting to upset my passengers I turned off the autopilot and began a smooth level off. We reached 5450 ft. or probably a bit more by the time I leveled off and started descending back down to 5000 ft. Made it down to 5160 ft. before crossing ZZZZ. During this the Controller pointed out the error and asked that I make the restriction in the future. He was very calm about it. Rest of flight was fine except for a few radio calls I didn't sound good on because I was eating or my throat was dry.Major cause was that I had recovered from COVID about a week earlier but it took something out of me even though it never felt like a strong disease. Last time I had COVID the same thing happened after the initial recovery - took a number of weeks to be 100% in mental clarity and overall physical condition. Before I caught COVID this time I was very happy about my alertness in recent single pilot flying - never missing a thing. I am writing this a week after the incident and I much better off now and every day is better. I had realized that I was not 100% and was flying very carefully and following correct procedures and it was working until this situation. Aircraft control was good throughout all of this.Next thing would be force of habit: I have only done this departure a few times and was always cleared to a higher altitude than 5000ft. without the restriction of climbing on the SID. And in the past it was always the ZZZZZ departure with no altitude restrictions on the SID.How to avoid in the future: I'd say my lack of alertness was the major cause so; if I'm coming back from COVID again or something similar I need to request a co-pilot or just stay home. This is the only glitch in many hours of flying over the last 2+ weeks after COVID.
Source: NASA Aviation Safety Reporting System (public domain). Reports are voluntary submissions and are not verified by NASA.