Check if a value comes between two rotation values

eulerAngles in general are always a bit unreliable for certain things.

The reason is that internally Unity doesn't store these but stores rotations as Quaternion. However, there are multiple ways of how to represent a Quaternion in euler space and eulerAngles just decides for the best human readable.

When you read the .eulerAngles property, Unity converts the Quaternion's internal representation of the rotation to Euler angles. Because, there is more than one way to represent any given rotation using Euler angles, the values you read back out may be quite different from the values you assigned.

Easier in my eyes would be to not think in rotation angles at all.

An equal way to make your check rather simply vector based would be checking if the Vector3.Angle between the global Vector3.up vector and your local transform.up is within your threshold

if(Vector3.Angle(Vector3.up, transform.up) <= 1f)
{
    Debug.Log ("object is in between");
}