Take a tape measure and let it hang like a plumb line from the ceiling over the stairs to get the measurement. (“Walk it” up the ceiling of the stairwell and make note of the length at which it hits the stairs.) Do the entire stairwell because the ceiling angle is probably not the same as the stair angle.
A distance of 76″ would be fine, since the shortest side of a king is 76″, but mattresses** are flexible so a couple inches less shouldn’t be a problem. If you have a turn in your stairwell, that’s another challenge, but if it’s a straight shot to a landing, and then the mattress can be hoisted over a railing, you should be ok. Also, if you’re having the mattress delivered, those guys do this all the time.
**Mattresses are flexible; box springs are not. But a king set should have a 2-piece box spring.