A 26-year-old Army private who was being treated for AIDS at Walter Reed Hospital committed suicide on Saturday by hanging himself from his bootstraps in a stairwell, according to medical and Army sources.

Michael W. Foster of Marion, Ala., was found dead shortly after noon by a patient and the patient's friend who got lost while looking for the hospital's bank, according to hospital spokesman Pete Esker.

He was pronounced dead on the scene by medical corpsman. "He died of strangulation or separation of the spinal cord," Esker said.

An autopsy was performed by the D.C. medical examiner's office, but results are not yet public. The death is under investigation by the U.S. Army office of criminal investigation.

Hospital officials would not discuss Foster's medical treatment, but sources said his ailment had been diagnosed as AIDS and he was one of 41 persons at Walter Reed for AIDS treatment or because their blood shows antibodies to the AIDS virus. About half are hospitalized and the rest live outside the grounds or in a medical hold unit in the former pediatric and ear-nose-throat wards of the old hospital building. The unit consists of large rooms of 15 bunks, with individual lockers.

Esker said that Foster had been living in the hold unit since Jan. 9 and had been transferred to the hospital from his unit at Fort Knox, Ky.

Army policy is to transfer soldiers with AIDS antibodies or symptoms of AIDS to the nearest Army hospital for evaluation or treatment, Esker said.

Walter Reed has treated or evaluated about 150 soldiers for acquired immune deficiency syndrome since the Army hospital began keeping records on the illness in mid-1983, Esker said.

"After the suicide, the psychiatrists and social workers met with the patients and decided to step up their contacts," said Esker. "This incident has focused some attention on the problem" of counseling individuals with AIDS or who have been exposed to the AIDS virus, he said.