Both of mys sons with AS do these things and I used to, as well. With AS it seems to stem more from anxiety about illness or things we are afraid of. My kids all have their beds shoved right against the walls. For 2 of them it is the fear of spiders, for the other two it's the comfort of having only one side of the bed open. The 2 Aspies always have to lights on in the daytime, as do I. In my case, at night it is because I hate the dark and I'll admit I'm afraid of being stuck in it, and in the daytime, it's because I seem to need the extra light or I start to feel depressed and tired. Because many Aspies have light sensitivities, this may be an issue for him.
Both of my sons have extreme anxiety about getting sick, especially if there's something going around that involves vomiting. They're almost phobic about it. They are very careful about germs because of that fear. It isn't an OCD behaviour, it's a precaution.