Lockyer collapsed in the second half of Saturday’s match at Bournemouth and the game was subsequently abandoned.
The 29-year-old has had an implantable cardioverter defibrillator fitted – a small device used to treat people with dangerously abnormal heart rhythms.
“We are thankful to report that our captain Tom Lockyer has now begun a period of rehabilitation from the comfort of his own home after he was discharged from hospital on Wednesday,” Luton said in a statement.
“This encouraging news follows a successful procedure that took place on Tuesday whereby Tom had an ICD (implantable cardioverter defibrillator) device fitted to prevent a repeat of Saturday’s incident.”
The Wales defender had surgery to correct an atrial fibrillation after collapsing during Luton’s Championship play-off final win against Coventry in late May.
The club said in their statement that tests had revealed the issue was “different from the atrial fibrillation”.
Lockyer returned to action for the start of the new season and had made 15 appearances in all competitions before Saturday’s abandoned match.
The Premier League board has decided to replay the match in full, but no date for the fixture has yet been agreed.
Christian Eriksen was fitted with an ICD after he collapsed during Denmark’s European Championship game against Finland in June 2021.
After making a full recovery, the midfielder joined Brentford and made his comeback in February 2022. He now plays for Manchester United.
Bournemouth manager Andoni Iraola spoke of his relief about Lockyer’s recovery and paid tribute to the medical staff of both clubs.
Speaking at a press conference on Thursday, Iraola said: “I think we feel now more relieved that we have good news about Tom. We hope the good news continues and he recovers well.
“Obviously, there were tough moments last week. Everyone reacted very well. The supporters, obviously the medical staff were amazing.”