I need to build my simulated instrument time toward IR. Can flying under the hood in a glider (with an instructor/safety pilot...) be legally counted as simulated instrument time in the same way would be the case had it been an ASEL?
In the US, yes. According to the FARs you only need to have three hours in an airplane in preparation for the flight test and you must fly the cross country in an airplane so that’s probably another 3 hours.
It looks like you can log hours under the hood in a glider, but it would have to be with an airplane CFII. However, I don’t know that you would be able to train in any of the areas of operation except for (4) Flight by reference to instruments; so it probably wouldn’t be worth your time. I don’t know how you would fly an approach or fly a course by reference to navigation systems.
So as a practical matter, the answer is no.
§61.65 Instrument rating requirements.
(c) Flight proficiency. A person who applies for an instrument rating must receive and log training from an authorized instructor in an aircraft, or in a full flight simulator or flight training device, in accordance with paragraph (g) of this section, that includes the following areas of operation:
(1) Preflight preparation;
(2) Preflight procedures;
(3) Air traffic control clearances and procedures;
(4) Flight by reference to instruments;
(5) Navigation systems;
(6) Instrument approach procedures;
(7) Emergency operations; and
(8) Postflight procedures.
As an aside, I used to rent out my Cherokee to helicopter commercial students who needed instrument training
(i) Five hours on the control and maneuvering of a helicopter solely by reference to instruments using a view-limiting device including attitude instrument flying, partial panel skills, recovery from unusual flight attitudes, and intercepting and tracking navigational systems. This aeronautical experience may be performed in an aircraft, full flight simulator, flight training device, or an aviation training device;