The 47-year-old left the club just minutes after Tuesday night's 3-3 Sky Bet Championship home draw with Bolton, which left the Black Cats two places and two points off the foot of the table.
In a statement released through the League Managers' Association, Grayson said: "I would like to take this opportunity to express my thanks to the club and all the fans, players and staff at the training ground and the Stadium of Light.
"Sunderland are a huge football club and while I am very disappointed not to be continuing as their manager, I hope the club will stabilise and return the success and first-class football that the supporters and people of Sunderland deserve.
"I would like to wish everyone associated with Sunderland all the very best for the future."
Grayson was appointed on Wearside in June and took charge for only 18 competitive games, 15 of them in the league.
However, he tasted victory on only three occasions, twice in the Carabao Cup, and managed only 10 points from a possible 45.
Billy McKinlay, a member of Grayson's backroom staff, and first-team coach Robbie Stockdale have been placed in caretaker charge for Sunday's derby trip to Middlesbrough.
Aitor Karanka, Peter Reid, Kevin Phillips and Ally McCoist are among the bookmakers' favourites to replace the former Preston boss.
It is understood chief executive Martin Bain will look for experience as he attempts to identify a successor, with the forthcoming international break giving him a little extra time to get the right man.
Source : PA