An Elephind search of various newspaper databases finds a first mention of "take a knee" in 1885, in the context of boxing. From "Sporting Gossip" in the Maitland [New South Wales] Mercury (January 24, 1885):
Attention seems to be pretty well divided just at present between the annexation of New Guinea by the Germans, the Anniversary Handicap, and Farnan and Foley. I have nothing to say about Bismarck and his schemes, the second subject is dealt with elsewhere, whilst the pugs continue their newspaper battle with a degree of vigour that is wonderful, considering that they don't even take a knee between the rounds. The men have been fibbing one another so long in print that the public have grown tired of it, and the editors of the sporting prints patronised by them are beginning to wish that those gentlemen would die.
Evidently, in Australia in the late 1800s, prizefighters paused between rounds not on stools in opposite corners, but with one one knee resting on the canvas, a practice captured by the expression "take a knee."
Meanwhile in the United States, the term take a knee rest" shows up in 1893 and again in 1901. From Don Arturo Bandini, "Big Game in the West," in The Californian Illustrated Magazine (July 1893):
I had not gone a half mile when I came upon my game, whom I found in an opening, "fanning himself—briskly moving hid body from one side to the other, facing the breeze. Being pretty well blown I knelt down and taking a knee rest, opened fire. The bullet struck the bear full in his side, and after tapping the wound with his paw, he rushed toward me ; but from his unstable movements, I knew he would never reach me, and taking a quieter aim, a second bullet brought him down.
And from "Wild Animal Pictures: Woman Who Photographs Under Rifle Protection," in the [Reynoldsville, Pennsylvania] Star (July 17, 1901):
There is no record of a similar shot ["dropping two bucks at one shot] in the annals of sportsmanship, although two deer have been killed with a single bullet more than once. Owing to an injury to her right shoulder, Mrs. Wallihan now generally takes a knee rest. She always takes deliberate aim, and very rarely misses. But she loves her kodak far better than her Remington; and rather than cut the throat of the poor shuddering creature on the ground, she prefers to see it bound away, leaving its counterfeit behind to charm the artist or the sportsman thousands of miles away.
It is unclear whether "taking a knee" originated as "taking a knee rest"; I am unfamiliar with the latter expression. Still, the earliest mention of taking a knee in the context of U.S. football that I've been able to find uses the expression in the sense of resting momentarily. From Steve Winter, "Football Managers --- The Real MVPs," in the [American University, Washington, D.C.] Eagle (December 3, 1976):
Following the kickoff, the average spectator often hears more encouragement out of the girls, than much of the rest of the team. And during every time out, the trio of Jill,Annamarie and Evelyn scooter onto the field with towels and bottle of water to sooth the bruises of the aching gladiators.
"Take a knee! Sit back on the bench or take a knee! yells Anne Bertussi , a slight , bespec[tac]led little fireball who hustles up and down the sidelines playing ball exchange with the referees.
As in the boxing example, "taking a knee" here means resting on one knee until play resumes.
Ben Zimmer had better luck than I did in finding early newspaper articles that used the phrase examples of "take a knee" in the specific context of U.S. football. In a Language Log post—"A brief history of 'taking a knee'" (September 25, 2017)—Zimmer notes instances from 1960 (in South Carolina), 1972 (in Florida), 1973 (in Virginia), 1974 (in Texas), and later. Here is the relevant wording from the earliest of those articles, "The Great Moment," in the [Columbia, South Carolina] Stete (May 2, 1960):
"Some of us talked about this before the game. We all played for him. We all loved him. Now he's gone. So let's all take a knee for a moment of silence for our Rex Enright."
(Credit for finding and pointing out this discussion goes to the dean of EL&U etymology researchers, Hugo.)
As RaceYouAnytime points out, the standard meaning of "taking a knee" in U.S. football today is to voluntarily end a play without getting tackled, by touching one's knee to the ground. Originally this was not merely a symbolic act: under college football rules of the 1960s and 1970s, a play ended automatically when a player holding the ball fell down or allowed one of his knees to touch the ground. Still, it is possible that "taking a knee" in the play-ending sense may be a figurative extension of "taking a knee" in the sense of resting momentarily while kneeling on one knee. And that, in turn, might be linked to the turn-of-the-twentieth-century notion of "taking a knee rest."